Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> pl/sql error handling
Maybe you guys could help me out...
I have a sql script used to migrate data from some tables in new ones.
There is some processing to be done there as well, so i do this in a
loop.
I'm using a spool file to check for the errors.
Unfortunately there may be inconsistent data in the old tables, so those
rows wont be inserted which is still ok. I want them reported in the
spool file though.
With no error handlers, the first error would cause the loop to be
aborted, so i would be missing all the subsequent rows.
If I'm placing an error handler around the insert statement like
......
begin
insert into new_table..
EXCEPTION WHEN OTHERS THEN
commit;
end;
it would fix this problem, but in the log file there will no longer be
reported an error.
Any idea how to write to that spool file the error.
I donut want to insert the errors in a table or something like that, i
want oracle to direct the errors to the spool file
much appreciated Received on Mon Oct 16 2000 - 15:46:56 CDT