update SQl table from values in excel

我们两清 提交于 2019-12-23 05:31:12

问题


I am using the SQL Developer or SQl express.

How do i get the values from an excel sheet and update those in a column of my database...

Please help thanks.

i have this and im running it but i get error:

SELECT * 
FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
            'Excel 8.0;Database=C:\books.xls',
            'SELECT * FROM [Sheet1$]')

i get error now

OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" returned message "Could not find installable ISAM.".

thanks


回答1:


Do you have SQL Server Management Studio Express? If so, try using the Import/Export Wizard to import the spreadsheet into a new table.




回答2:


THIS IS HOW MY CODE WORKS

INSERT INTO TEMPTABLE (name)
 SELECT * 
   FROM OPENROWSET(
                   'Microsoft.Jet.OLEDB.4.0', 
                   'Excel 8.0;IMEX=1;HDR=NO;DATABASE=C:\test.xls', 
                   'Select * from [Sheet1$]'
                  );

i hope this helps some1



来源:https://stackoverflow.com/questions/4513256/update-sql-table-from-values-in-excel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!