Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

FORALL Statement exception handling and record information

RenanMCJul 15 2011 — edited Jul 15 2011
Hi everyone!

I was studying the FORALL statement and developed a DATA-LOAD package using it (loaded from an array filled with BULK COLLECT of course).

The problem is when someone asked me:
"Great that you are using FORALL, but how to know what record brought the error?"

Dramatic pause...
...
...

After a little search I found that I can get a whole collection containing ERROR_CODE and ERROR_INDEX of the exception.
Good, the point is that there is no way to get any information about the record that brought the error, isn't?

Then I changed the FORALL statement with a normal FOR LOOP and everything just works fine now.

The question is:
Is there a way to get any information about the record exception using the FORALL statement?
Like when INSERTING a whole collection of employees I want to have the ID that gave me the error and return it to anywhere, is it possible?

Really appreciate if anyone help me with this!!!

Thanks,
Renan.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 12 2011
Added on Jul 15 2011
5 comments
1,680 views