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 |
|
decapolo
Starting Member
15 Posts |
Posted - 2005-12-28 : 00:19:01
|
| Hi ...I need to transfer data from the client-side to the server side in a way such that the auto-generated values for the primary keys of the tables remain intact. But the tables on my server-side also have auto-generated primary keys. So is there a way to remove the 'auto-generated' IDENTITY constraint for a table using T-SQL statements? and then reinstate the constraint when required? |
|
|
shallu1_gupta
Constraint Violating Yak Guru
394 Posts |
Posted - 2005-12-28 : 00:32:38
|
| Use SET IDENTITY_INSERT <Table Name> ONnow you can add values for identity columnsSET IDENTITY_INSERT <TableName> OFF |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-12-28 : 00:55:14
|
| And there are changes of duplicate values if you use the above methodMadhivananFailing to plan is Planning to fail |
 |
|
|
decapolo
Starting Member
15 Posts |
Posted - 2005-12-28 : 01:01:20
|
| hey thanks a lot ... it worked ...regardz,sAm |
 |
|
|
|
|
|