HANA 102.05无法执行以下代码:
CREATE TABLE ATABLE( f INT );
CREATE PROCEDURE TestProc()
AS
BEGIN
SELECT f FROM ATABLE
FOR UPDATE; -- Without FOR UPDATE it works
END;
SELECT 'Hello' FROM DUMMY;
抱怨:
SAP DBTech JDBC:[257]:sql语法错误:“SELECT”附近的语法不正确:第8行第2列(位于第124位)
指出诉讼之外的SELECT 'Hello'
。该过程本身编译没有错误。如果删除FOR UPDATE
指令,整个脚本将成功完成。原来有什么问题?
当我从 hdbsql.exe 执行相同的查询时,我得到:
0 rows affected (overall time 26,076 msec; server time 6518 usec)
* 257: sql syntax error: line 5 col 9 (at pos 71) SQLSTATE: HY000
* 257: sql syntax error: incorrect syntax near "END": line 2 col 1 (at pos 32) SQLSTATE: HY000
'Hello'
"Hello"
1 row selected (overall time 4644 usec; server time 143 usec)