Quote:
Originally Posted by macgayver
I'm trying to compile this procedure and came across the following error:
Code:
---------- STATEMENT ----------
CREATE PROCEDURE GRETAGAURDA.VALIDA_ACESSO
...
BEGIN
stmt;
...
END
;
COMMENT ON SPECIFIC PROCEDURE GRETAGAURDA.VALIDA_ACESSO
IS ''
|
Your problem is most likely that you mix two different uses of the ";" character:
1) inside the procedure definition, as the (required) SQL PL syntax for statement termination, and
2) after the final END, for your client application to know which two statements (viz. the "CREATE" and the "COMMENT" statements) to be passed separately to DB2.
Clearly this cannot work: either the client application thinks the first ";" is for him, thus sending an incomplete CREATE statement to DB2, or not detecting the separators, in which case the whole set is sent as one "CREATE" statement to DB2.
Solution: (1) tell your client that it must use "@" as a separator instead of ";", and (2) replace the last ";" (after "END") by "@".