Hello All,
I am trying to write a Db2 Stored Procedure and getting an error.
The basic structure of my SP is
Create table a
Insert into table a
Create table b
Insert into table b
Create table c
Insert into table c
Cursor select statement
open cursor
I am getting the following error on the cursor select statement:
$$UUDVLP.SDG0012P - Build started.
DROP SPECIFIC PROCEDURE $$UUDVLP.SQL060113102640200
$$UUDVLP.SDG0012P - Drop stored procedure completed.
Create stored procedure returns -104.
$$UUDVLP.SDG0012P: 339: [IBM][CLI Driver][DB2/NT] SQL0104N An unexpected token "<cursor declaration>" was found following "". Expected tokens may include: "<SQL statement>". LINE NUMBER=339. SQLSTATE=42601
$$UUDVLP.SDG0012P - Build failed.
$$UUDVLP.SDG0012P - Roll back completed successfully.
Any ideas?