cancel
Showing results for 
Search instead for 
Did you mean: 

Syntax Error if i try to start my hana query in Crystal Reports with any command except SELECT

Former Member
0 Kudos

Dears Experts,

i face issue when i try to start my query in crystal reports with ( IF Statements, Declare Variables,...etc) except SELECT

For Example :

if i run the report with this query :

SELECT * FROM OINV T0

But if i run the reports with this query:

IF 1=1

THEN

SELECT * FROM OINV T0;

END IF;

it will give to me this error message:

Syntax error or access violation; 257 sql syntax error: incorrect syntax near "IF": line 1 col 1 (at pos 1) [Database Vendor Code:257]

Please note :

when i take the same query and execute it in SAP it returns data correctly.

Please advise,

Accepted Solutions (0)

Answers (0)