简体   繁体   中英

HANA SQL Syntax error

I am trying to translate some code to HANA SQL Script, however I get the following error

"Incorrect syntax near 'is': line 29 col 76".

The "IS NULL" seems to be an issue, however I am not sure where to place it as I am only a beginner in SQL.

WHERE IS NULL(T2."Manual", '') = 'Y' AND T0."EntryNumber" = :list_of_cols_val_tab_del;

Help will be much appreciated.

Thanks, Katie.

Changed the code to what's below and the SP successfully executed. Thanks.

WHERE (T2."Manual" = 'Y' or T2."Manual" is NULL) AND T0."EntryNumber" = :list_of_cols_val_tab_del;

This query will not raise error:

WHERE IFNULL(T2."Manual", '') = 'Y' AND T0."EntryNumber" = :list_of_cols_val_tab_del;

And you should use this instead, the IFNULL function is not necessary in your case:

WHERE T2."Manual" = 'Y' AND T0."EntryNumber" = :list_of_cols_val_tab_del;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM