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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Table import losing identity field informtion

Author  Topic 

cplusplus
Aged Yak Warrior

567 Posts

Posted - 2009-03-11 : 10:16:17
Using sql server 2005:

When i import a table to database, it is getting the table with its data.

But i identity column info is lost, meaning i will have to again manually set the field as identity with increments 1.

How can i keep all that information intact at the time time of importing table to this new database.

Thank you very much for the helpful information.

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-03-11 : 10:36:30
How are you importing?
Both BCP and BULK INSERT have settings for keeping IDENTITY values.



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-03-11 : 13:50:57
and if you're using export import wizard, then also you've an option called enable identity insert to preserve values of identity column to be same as source.
Go to Top of Page
   

- Advertisement -