Skip to Main Content

Oracle Database Discussions

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!

Workaround for ORA-00001: unique constraint violated

610916Oct 1 2008 — edited Oct 1 2008
Hi:

Does anybody have a workaround for this?

I am in 10.2.0.3. My sql (insert based on select) gives ORA-00001: unique constraint violated.

I'd like to insert only rows which would not violate the constraint & skip the rows which do.

Maybe this could be done by some trigger which will delete rows from the table (where I am trying to insert) before actual insert...I tried this - did not work for me.

I'm asking for a generic workaround so that even "insert into tab1 select * from tab2;" would work. Suggestions appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 29 2008
Added on Oct 1 2008
3 comments
1,007 views