Dim idx As String = "-1,"
Dim idx_temp As String = ""
Dim pdr As DataRow = Nothing
Dim count As Integer = 0
Dim cs As String = "第一列"
For Each dr As DataRow In DataTables("表A").Select("", cs)
Dim flag As Boolean = False
If pdr IsNot Nothing Then
For Each c As String In cs.split(",")
If pdr(c) <> dr(c) Then
flag = True
Exit For
End If
Next
If flag Then
If count > 1 Then
idx &= idx_temp
End If
count = 1
idx_temp = ""
Else
count += 1
idx_temp &= dr("_Identify") & ","
End If
End If
pdr = dr
Next
If count > 1 Then
idx &= idx_temp
End If
'Tables("表A").filter = "_Identify not in (" & idx.trim(",") & ")"
DataTables("表A").DeleteFor("_Identify In (" & idx.trim(",") & ")")