Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where is IDENTITY_INSERT set?
Message
 
To
21/07/2005 17:40:16
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
01034933
Message ID:
01034984
Views:
19
Ted,

If you're doing this as a one time shot, just use Query Analyzer to set it, insert your rows, and then set it back (although, once your session is gone, it's reset automatically). If it's something you're doing from a program, besides being a bad idea ;), you would just do it in a stored procedure. You can also include it SQL sript files that can be run from Query Analyzer or a command line utility (iSQL, I think is the name of it). If it's a one time deal to load migration data from an older system, you may just want to change it to a non-identity column, add the rows, then set it back to an identity column with an initial seed value higher than the largest value in that column. Of course, you could probably do all that in code, too.

HTH,
Chad

>All:
>
>Where is IDENTITY_INSERT set in SQL Server when you want to insert values into identity fields?
>
>Thanks,
>
>Ted Badje
_________________________________
There are 2 types of people in the world:
    Those who need closure
Previous
Reply
Map
View

Click here to load this message in the networking platform