For Each ro As Row In Tables("qt").rows
Dim dr As DataRow = DataTables("quhuo").SQLFind("cord = '" & ro("cord") & "'")
If dr IsNot Nothing Then
MessageBox.Show("数据汇总表中已经存在 ")
Return
ElseIf dr Is Nothing Then
Dim Cols1() As String = {"name","shangcheng","总未送数量","danhao","cord","time"}
Dim Cols2() As String = {"name","shangcheng","shuliang","danhao","cord","time"}
For Each dr1 As DataRow In DataTables("qt").Select("[状态] ='未送'")
Dim dr2 As DataRow = DataTables("quhuo").AddNew()
For i As Integer = 0 To Cols1.Length -1
dr2(Cols2(i)) = dr1(Cols1(i))
Next
Next
End If
Next
想把 qt 表的数据 复制到 quhuo表
如果quhuo表里已经有 相同的cord值 就跳过 继续复制其他行到 quhuo表
现在的问题是 qt表的 第一行如果 在quhuo表 有相同的值, 后面的行全部放弃拷贝,应该怎么处理?
非常感谢!!!!