22,210
社区成员
发帖
与我相关
我的任务
分享
--打开“show advanced options”和“Ad Hoc Distributed Queries”的外围应用配置器
exec sp_configure 'show advanced options',1
reconfigure
exec sp_configure 'Ad Hoc Distributed Queries',1
reconfigure
go
----查询
SELECT * FROM OpenDataSource
( 'Microsoft.ACE.OLEDB.12.0','Data Source=E:\test_one.xls;User ID=Admin;Password=;Extended properties=Excel 12.0')...[Sheet1$]
----插入
insert into FX_ZMD.dbo.product
SELECT * FROM OpenDataSource
( 'Microsoft.ACE.OLEDB.12.0','Data Source=E:\test_one.xls;User ID=Admin;Password=;Extended properties=Excel 12.0')...[Sheet1$]
go