Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
junior6202
Starting Member
45 Posts |
Posted - 2014-07-22 : 17:14:19
|
Hi All,I wanted to see if i could get some guidanace for this task that I am working on. I've task with creating a query that will import data from an Excel .csv file. I wrote a simple query using an INSERT INTO MyTableSELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0','Excel 12.0;Database=D:\test.csv', [Sheet1$])but I am having no luck. I know that you can use the SQL query wizard to import an Excel Data to SQL but I'm planning on making this task in to a macro and making it automatic. Thank you in advance. |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2014-07-22 : 17:16:06
|
You'll need to describe "but I am having no luck". Are you getting an error? If so, please post it.Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |
|
|
junior6202
Starting Member
45 Posts |
Posted - 2014-07-23 : 08:37:20
|
I am getting an error. I think my problem is my file path, I'm using Excel 2010, this is the error i'm gettingMsg 7308, Level 16, State 1, Line 4OLE 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. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|