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 |
dtrivedi
Posting Yak Master
153 Posts |
Posted - 2011-01-24 : 11:20:24
|
I am inserting rows from one table to another. here is the insert statement insert into tsysIPScanRanges select * from Sheet1$;I am getting this error what do i need to do... Msg 2627, Level 14, State 1, Line 1Violation of PRIMARY KEY constraint 'PK_tsysIPScanRanges'. Cannot insert duplicate key in object 'dbo.tsysIPScanRanges'. |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-01-24 : 11:53:29
|
check whats the primary key of table. and make sure you avoid records of duplicate values for Primary key column coming from the sheet.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2011-01-25 : 03:27:39
|
You need to select the data from Sheet1$ which are not available in tsysIPScanRangesMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|