0

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.

coderblogger
  • 84
  • 11

2 Answers2

1

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;
Pham X. Bach
  • 5,284
  • 4
  • 28
  • 42
0

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;
coderblogger
  • 84
  • 11