简体   繁体   English

HANA SQL语法错误

[英]HANA SQL Syntax error

I am trying to translate some code to HANA SQL Script, however I get the following error 我正在尝试将一些代码转换为HANA SQL脚本,但是出现以下错误

"Incorrect syntax near 'is': line 29 col 76". “'is'附近的语法不正确:第29行第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. “ IS NULL”似乎是一个问题,但是由于我只是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. 将代码更改为以下内容,并成功执行了SP。 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: 而且您应该使用它,在您的情况下, IFNULL函数不是必需的:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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