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!

How to bypass and log an error while inserting data ?

bootstrapAug 8 2014 — edited Aug 13 2014

I am using below code to insert data into a table by fetching data from another table.

insert into tab1(id,name)
select id,name from tab1_X;

But suppose due to any issue one or more insert fails, then I need to log that error in my custom error log table and also need to execute next insert i.e., insertion of other rows should not stop on failure of any one.

Can anyone please help in this.

I am using Oracle 10g database.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 10 2014
Added on Aug 8 2014
12 comments
8,421 views