View Single Post
  #1 (permalink)  
Old 02-09-10, 18:57
surjyakp surjyakp is offline
Registered User
 
Join Date: Jan 2010
Posts: 26
Need to store SQL error code in debug table

Hi,
I have one table having column dbg_lvl and dbg_msg.
Let say i executed some update sql statement in stored perocedure which has some eror. e.g. it threw the error like

SQL0150N The target fullselect, view, typed table, materialized query table,
or staging table in the INSERT, DELETE, UPDATE, or MERGE statement is a target for which the requested operation is not permitted. SQLSTATE=42807

Now I want to store 42807 in dbg_lvl column and the message "SQL0150N The target fullselect, view, typed table, materialized query table,
or staging table in the INSERT, DELETE, UPDATE, or MERGE statement is a target for which the requested operation is not permitted" in dbg_msg column.
Is it possible, if yes then how?

Thanks
Surjya
Reply With Quote