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 |
|
ewomack
Starting Member
33 Posts |
Posted - 2011-07-26 : 10:56:57
|
| Hello,I have to move some data from test to prod, but I need to preserve the IDs (in the identity column) when I do so. The Ids are not sequential and are tied to other processes, so the numbers need to match when moved.I'll use SQL compare to port the schema, but if I use a general INSERT statement won't the new table seed the IDs numerically from 1 to n? Thank you!Ed Womackwww.getmilked.com |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2011-07-26 : 11:02:02
|
| SET IDENTITY_INSERTAlso, if you use SSIS to move the data, there is a check box to keep identity values. |
 |
|
|
ewomack
Starting Member
33 Posts |
Posted - 2011-07-26 : 14:33:48
|
| Ah! Cool. Thank you much, I will read up.Ed Womackwww.getmilked.com |
 |
|
|
|
|
|