Dim drs1,drs2 As List(Of DataRow)
drs1 = DataTables("报关单数据201516").Select("[申报日期] >= #1/1/2015# And [申报日期] < #1/1/2016#")
drs2 = DataTables("报关单数据201516").Select("[申报日期] >= #1/1/2016# And [申报日期] < #1/1/2017#")
Dim names1,names2 As new List(of String)
For Each dr1 As DataRow In drs1
If names1.Contains(dr1("经营单位编号")) = False Then
Names1.Add(dr1("经营单位编号"))
End If
Next
For Each dr2 As DataRow In drs2
If names2.Contains(dr2("经营单位编号")) = False AndAlso names1.Contains(dr2("经营单位编号"))=False Then
Names2.Add(dr2("经营单位编号"))
End If
Next
如代码所示,我已经筛选出了两个集合names1 和 names2
我怎么让我的tables("报关单数据201516")筛选出集合names2中包含的经营单位编号的所有行呢?