--将数据导入到临时表#packageinfo里面
select * into #packageinfo from
OPENROWSET('MICROSOFT.JET.OLEDB.4.0'
,'Excel 5.0;HDR=YES;DATABASE=G:\packageinfo.xls',sheet1$)
--将临时表里面的数据导入到packageinfo
insert into packageinfo select * from #AA
--删除临时表
drop table #packageinfo
EXEC sp_configure 'show advanced options', 1
GO
RECONFIGURE
GO
EXEC sp_configure 'Ad Hoc Distributed Queries', 1
GO
RECONFIGURE
GO