I am getting quite few queries from my friends and also from various forums on importing the data into SQL Server from csv file.
Use the below query.
SELECT *
INTO theEMPImportTable
FROM
OPENROWSET('MSDASQL',
'Driver={Microsoft Text Driver (*.txt; *.csv)};
DEFAULTDIR=D:\;Extensions=CSV;',
'SELECT * FROM CSVEmployeeFile.csv')
Saturday, January 19, 2008
Import CSV file into SQL Sever
Labels:
SQL,
SQL Server,
SQL Server Tips
Subscribe to:
Post Comments (Atom)
1 comment:
I like your blog.
Your code is so simple in importing CSV file into SQL Server
Post a Comment