sql关联excel查询
select * from 表名 where 字段名 in (
SELECT excel列名 FROM OpenDataSource
( 'Microsoft.Jet.OLEDB.4.0','Data Source="C:\test.xls";User ID=admin;Password=;Extended properties="Excel 8.0;HDR=Yes;";Persist Security Info=False')...[Sheet1$])
select * from 表名 where 字段名 in (
SELECT excel列名 FROM OpenDataSource
( 'Microsoft.Jet.OLEDB.4.0','Data Source="C:\test.xls";User ID=admin;Password=;Extended properties="Excel 8.0;HDR=Yes;";Persist Security Info=False')...[Sheet1$])