I have an Excel file with just one field and it contains numbers. I want to read the Excel file into a table in SQL Server. I have tried to use
select * into tablename
FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=D:\testing.xls;HDR=YES', 'SELECT * FROM [Sheet1$]')
However I am unsuccessful because I get the following error
Msg 7308, Level 16, State 1, Line 2
OLE DB provider 'Microsoft.Jet.OLEDB.4.0' cannot be used for distributed queries because the provider is configured to run in single-threaded apartment mode.
Can you please help me out. I dont want to use SSIS. All I want is T-SQL.
Thank you all in advance.