Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> pl/sql error handling

pl/sql error handling

From: ionut <ionut_at_provsys.com>
Date: Mon, 16 Oct 2000 16:46:56 -0400
Message-ID: <39EB6940.4FFA3CA@provsys.com>

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US