I'm trying to insert row by row in a table about 100k records.. I get this error after some 140 or so..
Violation of PRIMARY KEY constraint 'PK_table1'. Cannot insert duplicate key in object 'table1'. The statement has been terminated.
In this case the primary key is an IDENTITY column. I do not include that column in my INSERT statements.
I ran DBCC CHECKIDENT (table1,noreseed)
The current identity value and the current column value are NOT the same..
If I run the same command in 5 min.. they become same..
I can not make out what is the problem.. any help.. highly appreciated on this weekend.. :(