Import .CSV to SQL Table
BULK INSERT New_Table FROM 'c:\csvfile.txt' --or a .csv file WITH ( FIELDTERMINATOR = ',', ROWTERMINATOR = '\n' ) GO
![]()
Yes, so gracefully simple…
Just create the table beforehand

Get a free blog at WordPress.com. Theme: ChaoticSoul by Bryan Veloso.
OMW i am so going to kill you for this. Been searching for a way to do something like this and just kept on hitting dead ends.
Gratis
Hello Readers,
Please go to following link :
http://blog.sqlauthority.com/2008/02/06/sql-server-import-csv-file-into-sql-server-using-bulk-insert-load-comma-delimited-file-into-sql-server/
It has explained the same concept in detail.
Regards,
Pinal Dave ( http://www.SQLAuthority.com )
[...] Import .CSV to SQL Table [...]
20,000 hits « Welcome to the Fallout said this on April 15, 2009 at 11:43 pm |