Page 1 of 1

Issue with Duplicates

Posted: Thu Nov 29, 2007 9:10 pm
by devsonali
Hi All
I have the following error message when I try to insert records in D_UNIT_Measure table (SQL SERVER) , this has UOM_ID as the primary key and in indexes it shows up PK_D_UNIT_Measure(clustured) and UOM_IDX(Unique,Non Clustured) ?
I have problem in understanding the error as I know for sure that there are no duplicate or null value record for the column for which uom_idx is the index .
Please help me solving the same





APT_CombinedOperatorController,0: [DataDirect][ODBC SQL Server Driver][SQL Server]Cannot insert duplicate key row in object 'dbo.D_UNIT_MEASURE' with unique index 'UOM_IDX'. [odbcUtils.C:1280]


Thanks

Posted: Thu Nov 29, 2007 9:33 pm
by ray.wurlod
Clearly your understanding and SQL Server's do not coincide.

The mere fact that there are no duplicates in the source data means nothing if one value in the source matches a value already in the target table.

You must check, in your job flow, that this is not the case. Do a lookup against the target table (or against a copy of relevant rows from it).