"Raquel" <ra****@nospam.com> wrote in message
news:fe******************************@localhost.ta lkaboutdatabases.com...
This is regarding SQL stored procedures. The guide says this about handler
declaration in SQL procedures:
"handler declaration can specify a SQL-procedure-statement.
SQL-procedure-statement is a set of statements that execute when the
handler receives control."
But I don't understand how a 'set of statements' can be specified as a
SQL-procedure-statement when UDB does not allow nested compound
statements.
Also, any idea why I cannot use the following in SQL procedure:
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION GOTO ERROR_HANDLE;
The above line gives an error during CREATE PROCEDURE: SQL0104N - An
unexpected token GOTO was found; expected tokens may include SET.
Thanks.
Raquel.
I would recommend the following book on stored procedures;
"DB2 SQL Procedural Language for Linux, UNIX, and Windows"
By Paul Yip, Drew Bradstock, Hana Curtis, Michael Gao, Zamil Janmohamed,
Clara Liu, Fraser McArthur
Published by Prentice Hall PTR.
You can download Chapter 5. "Exception Handling" for free at:
http://www-106.ibm.com/developerwork...p/splbook.html