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!

Merge stmt trying to insert duplicate while the ON clause is based on index

745400Jan 14 2010 — edited Jan 15 2010
Hi,

I am using a merge statement to insert record in a table. The table has an unique index based on four columns. The merge statement matches on all four column (a.column1 = b.column1 and a.column2 = b.column2 ... etc.) in the ON clause. If a match is found then it does nothing if not found corresponding record is inserted.

But for some reason it is trying to insert duplicate and I am getting unique constraint violated exception.

The database is huge and the source table contains more than 200,000 records.

Any idea how it can happen?
This post has been answered by Dom Brooks on Jan 15 2010
Jump to Answer

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 12 2010
Added on Jan 14 2010
4 comments
1,436 views