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$])

posted @ 2016-04-28 10:41  Luca-  阅读(572)  评论(0编辑  收藏  举报