一个数据库名A
表名A1
两列分别是B1和B2
向表里导入Excel的数据时要和表内原有数据对比去重
我是这样写的语句,执行起来特别慢是怎么回事,求大神支招
Insert into A1 (B1,B2)
SELECT B1,B2 FROM OpenDataSource('Microsoft.ACE.OLEDB.12.0','Data Source=
"d:\15.xls";
User ID=admin;Password=;Extended properties=Excel 8.0')...Sheet1$
where B1 not in (select B1 from A1 group by B1)
group by B1,B2
表名A1
两列分别是B1和B2
向表里导入Excel的数据时要和表内原有数据对比去重
我是这样写的语句,执行起来特别慢是怎么回事,求大神支招
Insert into A1 (B1,B2)
SELECT B1,B2 FROM OpenDataSource('Microsoft.ACE.OLEDB.12.0','Data Source=
"d:\15.xls";
User ID=admin;Password=;Extended properties=Excel 8.0')...Sheet1$
where B1 not in (select B1 from A1 group by B1)
group by B1,B2