参考代码
For Each dr As DataRow In DataTables("表A").Select("第一列 is not null")
Dim fdr As DataRow = DataTables("表C").Find("第一列 = '" & dr("第一列") & "'")
If fdr Is Nothing Then
fdr = DataTables("表C").AddNew
End If
fdr("第一列") = dr("第一列")
fdr("第二列") = dr("第二列")
Next
For Each dr As DataRow In DataTables("表B").Select("第一列 is not null")
Dim fdr As DataRow = DataTables("表C").Find("第一列 = '" & dr("第一列") & "'")
If fdr Is Nothing Then
fdr = DataTables("表C").AddNew
End If
fdr("第一列") = dr("第一列")
fdr("第三列") = dr("第二列")
Next