"An explicit value for the identity column in table 'johndoe.dbo.xyz' can only be specified when a column list is used and IDENTITY_INSERT is ON."
After some research came across the solution. You will need to do 2 things
1) Specify column list(s) to which you are inserting the value(s).
2) Turn Identity insert On.
To turn it on:
set IDENTITY_INSERT tablename ON
To turn it off:
set IDENTITY_INSERT tablename OFF
Hope this will save you some time!
No comments:
Post a Comment