把Execel直接导入数据库的SQL语句
把Execel直接导入数据库的SQL语句,最近导入老数据,使用到了,共享出来
insert FlashReportChemical(deptName,reportDate,furnanceNumber,outputByDay,powerConsumptionByDay,salesByDay)
select '化工' as DeptName,上报日期,开炉数,日产量,日耗电量,日销量
from
OPENROWSET('MICROSOFT.JET.OLEDB.4.0','Excel 5.0;HDR=YES;DATABASE=D:\生产报表\化工.xls',Sheet1$)
where 日产量is not null
go
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)