Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
如何查找第一列数据重复的行,并把后面的重复行删除?
Dim idx As String = "-1,"
Dim pdr As DataRow = Nothing
Dim cs As String = "客户,工序"
Dim flag As Boolean
For Each dr As DataRow In DataTables("询价表").Select("客户 is not null and 工序 is not null", cs)
flag = 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
End If
If flag Then
idx &= pdr("_Identify") & ","
End If
pdr = dr
Next
If pdr IsNot Nothing Then
idx &= pdr("_Identify") & ","
End If
Tables("询价表").filter = "_Identify in (" & idx.trim(",") & ") and 客户 is not null and 工序 is not null"