How to Import data from Excel 2010 to SQL table

Posted by user2950101 on Stack Overflow See other posts from Stack Overflow or by user2950101
Published on 2013-11-03T15:36:46Z Indexed on 2013/11/03 15:53 UTC
Read the original article Hit count: 240

Filed under:
|
|

I am using this ,

Insert into smst(id,mobile,day,month,year,time,model,imie1,imie2,FullMessage)select * FROM OPENROWSET('Microsoft.Ace.OLEDB.14.0','Excel 14.0;Database=L:\SMS.xlsx;HDR=YES', 'SELECT id,mobile,day,month,year,time,model,imie1,imie2,FullMessage FROM [Sheet2]')

Could you please help and find the error?

sql error :

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('Microsoft.Ace.OLEDB.14.0','Excel 14.0;Database=L:\SMS.xlsx;HDR=YES', 'SELECT i' at line 1

i am using excel 2010.

© Stack Overflow or respective owner

Related posts about sql

Related posts about excel