hi there,
I am using MS SQL 2005.
i have an name.xls file (has 3 columns in one worksheet) that needs to be uploaded as a table with 3 fields (corresponding to the columns in my excel sheet) into my database.
i ran the following:
select *
from openrowset('microsoft.jet.oledb.4.0',
'Excel 8.0;database=[filepathandname],
'select * from [Sheet1$]')
i got this:
Msg 156, Level 15, State 1, Line 4
Incorrect syntax near the keyword 'select'.
Msg 105, Level 15, State 1, Line 4
Unclosed quotation mark after the character string ')
'.
may you have a better solution for this upload?
thanks
I am using MS SQL 2005.
i have an name.xls file (has 3 columns in one worksheet) that needs to be uploaded as a table with 3 fields (corresponding to the columns in my excel sheet) into my database.
i ran the following:
select *
from openrowset('microsoft.jet.oledb.4.0',
'Excel 8.0;database=[filepathandname],
'select * from [Sheet1$]')
i got this:
Msg 156, Level 15, State 1, Line 4
Incorrect syntax near the keyword 'select'.
Msg 105, Level 15, State 1, Line 4
Unclosed quotation mark after the character string ')
'.
may you have a better solution for this upload?
thanks