Skip to main content
Announcements
A fresh, new look for the Data Integration & Quality forums and navigation! Read more about what's changed.
cancel
Showing results for 
Search instead for 
Did you mean: 
dan-rosen
Contributor II

"Violation of PRIMARY KEY constraint. Cannot insert duplicate key in object" when using update or insert on tDBOutput

I'm receiving the error "Violation of PRIMARY KEY constraint. Cannot insert duplicate key in object" when using update or insert on tDBOutput for a table that needs to retain it's data (so it can't be dropped or truncated, etc.). I don't understand why I would get this error; if the key is duplicate, it should update. For reference, if I use insert, or I use update, they both work properly, but I can't get the combination option to work. Does anyone have any ideas why this would be happening? Thanks!

Labels (3)
2 Replies
Anonymous
Not applicable

Hi

Which DB type?

Make sure you have checked the 'key' box of the primary keys' column on schema of tDBOutput when you select 'insert or update' option.

 

Regards

Shong

 

PeggieP
Contributor

I appreciate the information and advice you have shared. I will try to figure it out for more.