HANA:嵌套过程调用打破游标?

时间:2016-11-02 13:38:08

标签: hana hana-sql-script

针对HANA 102.5执行时,以下批处理

CREATE PROCEDURE DUMMY( message nvarchar(254) )
AS
BEGIN
/* Do nothing */
END;

CREATE PROCEDURE cur_test
AS  CURSOR cur FOR
    SELECT 'code' FROM DUMMY;
    code NVARCHAR(64);
BEGIN
    OPEN cur;
    CALL DUMMY( 'Start' );
    WHILE 1 = 1 DO SEQUENTIAL EXECUTION
        FETCH cur INTO code;
        BREAK;
    END WHILE;
    CALL DUMMY( 'Finish' );
    CLOSE cur;
END;

CALL cur_test;

因错误而失败:

SqlScript: Unsupported type of lhs:CUR:unknown type

为什么会这样?请注意,当我删除对DUMMY的任一调用时,它都有效。当我评论FETCH语句时,它也有效。删除WHILE循环并单独留下身体也会使错误消失。

0 个答案:

没有答案