|
SQL 你看可以吗- Sub 查询方法一()
- Set CONN = CreateObject("ADODB.Connection")
- CONN.Open "provider=microsoft.jet.oledb.4.0;extended properties=excel 8.0;data source=" & ThisWorkbook.FullName
- Sql = "select * from [总表$a:s] where 搜索词 not like 'b0%' and 订单 > 0 "
- Sheets("搜索词有").[A3].Resize(104850, 19).Delete
- Sheets("搜索词有").[A3].CopyFromRecordset CONN.Execute(Sql)
- CONN.Close: Set CONN = Nothing
- Set CONN = CreateObject("ADODB.Connection")
- CONN.Open "provider=microsoft.jet.oledb.4.0;extended properties=excel 8.0;data source=" & ThisWorkbook.FullName
- Sql = "select * from [总表$a:s] where 搜索词 not like 'b0%' and 订单 = 0 "
- Sheets("搜索词无").[A3].Resize(104850, 19).Delete
- Sheets("搜索词无").[A3].CopyFromRecordset CONN.Execute(Sql)
- CONN.Close: Set CONN = Nothing
- Set CONN = CreateObject("ADODB.Connection")
- CONN.Open "provider=microsoft.jet.oledb.4.0;extended properties=excel 8.0;data source=" & ThisWorkbook.FullName
- Sql = "select * from [总表$a:s] where 搜索词 like 'b0%' and 订单 > 0 "
- Sheets("asin有").[A3].Resize(104850, 19).Delete
- Sheets("asin有").[A3].CopyFromRecordset CONN.Execute(Sql)
- CONN.Close: Set CONN = Nothing
- Set CONN = CreateObject("ADODB.Connection")
- CONN.Open "provider=microsoft.jet.oledb.4.0;extended properties=excel 8.0;data source=" & ThisWorkbook.FullName
- Sql = "select * from [总表$a:s] where 搜索词 like 'b0%' and 订单 = 0 "
- Sheets("asin无").[A3].Resize(104850, 19).Delete
- Sheets("asin无").[A3].CopyFromRecordset CONN.Execute(Sql)
- CONN.Close: Set CONN = Nothing
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|