Skip to content
Advertisement

Unique constraint violated while insert

I’m running this code

Prior to this, ADW12_DW.WC_MFG was truncated to update column size. So ADW12_DW.WC_MFG is empty before running the above code.

Advertisement

Answer

There may be duplicates in the data being added. Here is one way to limit the insert data:

col represents what is “unique”. It may be more than one column.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement