karthik parcha

karthik parcha

  • NA
  • 153
  • 92.7k

CSV File Import into the respective table

Sep 8 2011 9:57 AM
HI
How to import the csv file into its respective table in Sqlserver.
Here is my Code getting error like.....
OLE DB provider "MSDASQL" for linked server "(null)" returned message "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified".
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "(null)".

INSERT into Customers
SELECT * FROM OPENROWSET('Microsoft.JET.OLEDB.4.0', 'Excel 8.0;Database=D:\Anupama_WorkBase\Trumpia_Data_Sample\Trumpia_Data_Sample\07202011\[07-20-2011]Customers.csv','SELECT * FROM [(07-20-2011)Customers$]')

Thanks in advance

Answers (1)