If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
How can I retrieve an SQL-statement which ended in error
I have defined an exit handler in a stored procedure and now I want to store the SQL-statement in error in a table. How can I retrieve the SQL-statement which ended in error
The easiest way I can think of is before you execute a SQL statement, store it in a variable. Then in the error handler, the contents of that variable will be the offending statement to do with what you want.