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 2008 Forums
 SSIS and Import/Export (2008)
 Bulk Insert Issue

Author  Topic 

skc40
Starting Member

34 Posts

Posted - 2013-12-18 : 14:24:00
Hello all, below command executes successfully, but does not load any data.
BULK INSERT Test_Table FROM '\\1.1.1.1\Test\Test.csv' WITH (KEEPIDENTITY,FIELDTERMINATOR = ',',FIRSTROW = 2,ROWTERMINATOR ='\r\n')

Test_Table contains Identity Column. Upon removing the identity column from the Test_Table table, and running the above process executes successfully and inserts data available in Test.csv file.

Upon opening the CSV file as Text File, row ends on CRLF.

Could anyone please let me know how to import CSV file onto a table with Keeping Identity column!

Thanks

skc40
Starting Member

34 Posts

Posted - 2013-12-18 : 15:33:01
Nevermind, I found the answer at
http://www.bidn.com/forums/microsoft-business-intelligence/sql-server/1357/bulk-insert-and-identity-column
Go to Top of Page
   

- Advertisement -