Manually Insert into Identity Column SQL Server
Example to manually insert into an identity column in a table in a MS SQL Server database:
SET IDENTITY_INSERT tblSellingPeriod ON
INSERT INTO tblSellingPeriod (SellingPeriod_Id, Description, Sort) Values (28,'Temp',21)
SET IDENTITY_INSERT tblSellingPeriod Off
(i.e. you have to fiddle with the IDENTITY_INSERT flag)
Some references:
http://www.akadia.com/services/sqlsrv_programming.html
http://www.experts-exchange.com/Databases/Q_21040806.html
>>
Leonard Chan's Homepage
>>
Scribble Web
>> Manually Insert into Identity Column SQL Server