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
 Other SQL Server Topics (2005)
 Bulk Insert

Author  Topic 

chandralvsrr
Starting Member

7 Posts

Posted - 2011-08-08 : 08:30:07
Hi,

I am trying to upload CSV file into SQL Server using Bulk Insert.

But how to insert unique identifier(newid() which needs to be created while inserting record into table).

Can you please assist.

Thanks and Regards,
Ravi

LVSR Ravichandra

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2011-08-08 : 09:10:04
You just omit that column.
http://beyondrelational.com/blogs/madhivanan/archive/2010/03/17/bulk-insert-to-table-with-specific-columns.aspx

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

radjiv1
Starting Member

3 Posts

Posted - 2011-08-24 : 11:43:27
You have to declare one column as "int identity(1,1)" in the destination MS SQL table. This allows you to implement sequence of autoincrement values.

Radjiv
Go to Top of Page
   

- Advertisement -