Trapping unique constraint violations
567749Mar 19 2007 — edited Mar 29 2007Hi,
Can anyone help me on this one?
I have a table with a unique key to remove duplicates and I will be inserting records with duplicate values for this key.
I am trying to trap all the unique constraint violations for this key then insert the rows that violate the unique constraint into an error table.
I have tried using a data rule and also putting in a value for the exceptions table parameter in the constraint management section in configuration properties, and disabling constraints.
The data rule option does not seem to trap it and the constraint management option only seems to be for foreign keys!
I have searched through the forums but don't see anything specific to this.