Issue with Duplicates

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
devsonali
Premium Member
Premium Member
Posts: 155
Joined: Sun Mar 18, 2007 2:31 pm

Issue with Duplicates

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply