Primary key violation Warnings

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
tanaya.deshpande@tieto.co
Participant
Posts: 94
Joined: Sun Jul 18, 2010 11:35 pm

Primary key violation Warnings

Post by tanaya.deshpande@tieto.co »

Hi

I have a load job in which there is One SCD stage, a Join Stage.
Data is being loaded into a SQL server thru a SQLServer Stage.
the insert mode is update then insert.
My Primary key is the surrogate key which is Employeekey generated by the SCD stage.
I am getting Primary key violation Warnings.

Though there are no duplicate primary keys in the database.

can any body say why...
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Re: Primary key violation Warnings

Post by ray.wurlod »

tanaya.deshpande@tieto.co wrote:Though there are no duplicate primary keys in the database.
If that is true you can not get primary key violation warnings. Check again.

Code: Select all

SELECT KEY_COL, COUNT(*) FROM TABLE GROUP BY KEY_COL HAVING COUNT(*) > 1;
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