从excel文件MySql更新表

时间:2013-06-07 08:16:40

标签: mysql sql excel

update initl
set initl.High=Exc.High
from INITLIMITS as initl
INNER JOIN  OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\Users\nkavroulakis\Downloads\nikos\excel boundaries\server04testbound.xls;',
'SELECT Validator, SensorParam, High, Low FROM [Sheet1$]')as Exc
ON initl.Validator=Exc.Validator and initl.Sensor=Exc.Sensor and initl.Parameter=Exc.Parameter
where initl.Validator='NV200' and initl.Sensor='Stacker Full' and initl.Parameter='Gain1'

我正在尝试从excel文件更新数据库表,但我在OPENROWSET--> erron in sql syntax.上收到错误 任何想法如何解决这个????

0 个答案:

没有答案