EXEC SQL WHENEVER SQLERROR do sql_error("Oracle error");
EXEC SQL DECLARE temp_curcor SCROLL CURSOR FOR
SELECT ename
FROM EMP;
EXEC SQL OPEN temp_curcor;
/*FETCH最后一行记录*/
EXEC SQL FETCH LAST temp_curcor INTO :emp_name;
..................
编译的时候报错如下:
Syntax error at line 263, column 31, file test.pc:
Error at line 263, column 31 in file test.pc
EXEC SQL DECLARE salespeople SCROLL CURSOR FOR
..............................1
PCC-S-02201, Encountered the symbol "SCROLL" when expecting one of the following
:
. @ cursor, database, statement, table, type, partition,
The symbol "table," was substituted for "SCROLL" to continue.
......
期待指点,谢谢!
------解决方案--------------------
for i in 1...4 loop
end loop;