-
Add another Insert.....
Hi All,
Could you please let me know where to put Insert statement in following scenario. I have a procedure
CREATE PROCEDURE...
variable declaration
Cursor declaration
BEGIN
OPEN cursor
FETCH...
IF (condition meet)
BEGIN
Insert into X values (xx, xy, xz)
EXCEPTION
exception handling;
END
END IF
Close cursor
end
Now my doubt is once loading in X table completed successfully(without an error), i need to write a Insert statement { insert into Z values (xx, xz) }. I do not understand where to write this statement, as it should also handle the exception part. Could you please help me on this?
-
You can insert into Z immediately after insert into X. If insert into X fails, the exception is executed bypassing Z. If this is not what you want then you may need another procedure.
-
HI,
Do insert after x, if x fails it will go into the exception so no problem.
Thanks
Nani.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|