FORALL Statement exception handling and record information
RenanMCJul 15 2011 — edited Jul 15 2011Hi 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.