View previous topic :: View next topic
|
Author |
Message |
Mariraj
New User
Joined: 09 Jul 2007 Posts: 59 Location: Chennai
|
|
|
|
I need to employ the following logic in a Native SP (say NSP1).
Code: |
INSERT INTO TABLE1
DECLARE EXIT HANDLER FOR SQLEXCEPTION
CONSTRUCT ERROR MESSAGE
INSERT ERROR MESSAGE INTO TABLE2(ERROR TABLE) |
If the insert into TABLE2 fails for some reason, NSP1 needs to invoke another Native SP (say NSP2) which will display the error details in the spool.
I am not sure how to accomplish this since NSP1 abruptly ends in case of a sql error within the EXIT HANDLER.
Please let me know how to accomplish this using SQL/PL. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
Use
|
|
Back to top |
|
|
|