Page 1 of 1

Primary key violation Warnings

Posted: Thu Oct 21, 2010 1:39 am
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...

Re: Primary key violation Warnings

Posted: Thu Oct 21, 2010 2:23 am
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;