Thursday, October 28, 2010

Import data from .csv to sql

to import data from .csv file to sql server you can use below query.


BULK INSERT ZIPCodes
FROM 'e:\yourCSVFileName.csv'
WITH
(
FIRSTROW = 2 ,
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)

Share This!


1 comment:

Anonymous said...

thanks sir

Powered By Blogger · Designed By Seo Blogger Templates