How to get recent error message in sqlerrm?
Oracle version :10.2.0
OS : IBM AIX 5.0
I have a problem in getting the recent error message when using sqlerrm in a procedure.
What i am doing was, trying to delete records from the table which have somany references.So i hve written procedure for deleting it, if any error occurs, i ill get that corresponding table name and delete those records which hve referential ID which is in the parent table,after deleting in the child table it again starts deleting from the parent table.
So when this cycle occurs, i couldnt get the recent error message.
I can only get recent error message concatenated with the old error.
If you specified cascade delete on your constraints, then you should not be getting errors about child records. You should try using pl/sql collections and go through each child table deleting the relevant records and then delete the records in the parent table. With pl/sql collections you should not have problems with snapshot too old.
this space intentionally left blank
Click Here to Expand Forum to Full Width