Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
gangadhara.ms
Aged Yak Warrior
549 Posts |
Posted - 2009-12-09 : 08:39:32
|
Dear All,I am trying to copy the data between the 2 tables by joining with some other table.While running the package it gives primary key vailation error.There is 10 lacks of data is there i am not able to identify which row is vailating the primary key.Can u pls somebody help me to address this issue.Thanks,Gangadhar |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-12-10 : 13:53:56
|
well. you need to first identify what all forms the pk of destination. then go to source and use below queryselect pk1,pk2,...from <your source table>group by pk1,pk2,..having count(*)>1pk1,pk2,.. forms pk of destination table |
 |
|
goodsolution
Starting Member
38 Posts |
Posted - 2009-12-14 : 16:09:01
|
Gangadhara, do one thing before going into move the data, Check you primary keys and foreign keys from your both tables and try to use join conditions between them, once you are getting results with out any issues, then you can go for moving records. -Thanks |
 |
|
|
|
|