Unique Constraint Errors

Unique constraint errors are a part of life as a PeopleSoft developer. The most common way to troubleshoot them is to set up a SQL trace to determine the point of failure. Then its a matter of determining the bind variables that were passed to the insert statement and to figure out which key values are being duplicated …

However, there's an alternative approach that works really well when you are dealing with a complex process. Once you've identified the table the error is occurring on, try dropping the unique index on that table (usually called PS_<TABLENAME>) and then letting the process insert the duplicate rows.

You can then use SQL to group by the key fields to find the duplicated rows causing the unique constraint error. This can often be a lot faster than trying to track down bind variables being passed to the insert statement.

This is the technique I used to comment about the unique constraint error that occurs when you create a component interface from the JOB_DATA component on the PSST0101 blog.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License