cancel
Showing results for 
Search instead for 
Did you mean: 

Entry-SQL syntax error: CASE not allowed

Former Member
0 Kudos

Hello All. When I use sap netweaver developer to develop webdynpro applications, I always meet that jdbc error.

when using inner join,left join, or using case when in the sql, it will pop up Entry-SQL syntax error.

But I have run the sql in Microsoft SQL Server studio successfully.

The SQL statement "UPDATE SAPNWDDB.Z_SERIAL SET LASTSERIAL = CASE WHEN ENDWITH IS NOT NULL THEN CASE WHEN LASTSERIAL + 1 > ENDWITH THEN ISNULL(STARTWITH, 0) ELSE LASTSERIAL + 1 END ELSE LASTSERIAL + 1 END WHERE SERIALNO = ?" contains the syntax error[s]: - 1:43 - Entry-SQL syntax error: CASE not allowed

- 1:78 - Entry-SQL syntax error: CASE not allowed

- 1:124 - SQL syntax error: the token "(" was not expected here

Can someone help me? Thank you.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Can some gentlemen give me an answer?

p330068
Active Contributor
0 Kudos

Hi zegunlee330

Please try to get SQL query Error log file and then test it in SQL editor.

There may is some issue with sentax generated dynamically in your code. after test SQL query, modify your code.

Regards

Arun Jaiswal

Former Member
0 Kudos

Hi Arun Jaiswal ,

Thank you for your answer. But I have tried query in sql editor. Actually it can work. Other than "CASE" syntax, it seems not support inner join and left join in webdynpro either. I even can not query the db views.

That's imposible jdbc not support these simple syntex. I wonder there is any config control the sql compatibility level.

I have developped a java programm to test it. It is ok. No error. But the same case pop up error in java webdynpro application.I don't know why.

I am entry level webdynpro developper.

Hopefully you can help me.

Thank you.

Edited by: zegunlee330 on Sep 3, 2010 4:18 AM