Dim dt As DataTable = DataTables("表B") For Each ary() As String In dt.GetValues("第一列|第二列") Dim drs As List(Of DataRow) = dt.Select("第一列 = '" & ary(0) & "' and 第二列 = '" & ary(1) & "'") Dim pdr As DataRow = Nothing Dim flag As String = False For Each dr As DataRow In drs If pdr IsNot Nothing AndAlso dr("第三列") <> pdr("第三列") Then flag = True Exit For End If pdr = dr Next For Each r As DataRow In drs r("第四列") = flag Next Next
|