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
 SQL Server Administration (2005)
 BCP

Author  Topic 

ravilobo
Master Smack Fu Yak Hacker

1184 Posts

Posted - 2007-03-17 : 11:57:49
How to import into a table HAVING IDENTITY column using BCP.exe?



------------------------
I think, therefore I am - Rene Descartes

MohammedU
Posting Yak Master

145 Posts

Posted - 2007-03-17 : 12:05:45
If you want to skip insert fewer columns... use format files...
Import data as is into a permanant temp table and then insert into orignal table...
Or you can use BULK INSERT...
http://msdn2.microsoft.com/en-us/library/ms188365.aspx


MohammedU
Go to Top of Page

ravilobo
Master Smack Fu Yak Hacker

1184 Posts

Posted - 2007-03-17 : 14:11:50
Thank you MohammedU!

Read your link, following sublink in your article provides the answer.
http://msdn2.microsoft.com/en-us/library/ms186335.aspx



------------------------
I think, therefore I am - Rene Descartes
Go to Top of Page

mightypenny_ph
Yak Posting Veteran

54 Posts

Posted - 2007-03-19 : 05:40:07
there's a 'Keep identity' switch in BCP... -E switch... :)

SlayerS_`BoxeR` + [ReD]NaDa
Go to Top of Page

ravilobo
Master Smack Fu Yak Hacker

1184 Posts

Posted - 2007-03-19 : 15:51:19
quote:
Originally posted by mightypenny_ph

there's a 'Keep identity' switch in BCP... -E switch... :)



Yes. Thank you mightypenny_ph!

------------------------
I think, therefore I am - Rene Descartes
Go to Top of Page
   

- Advertisement -