Dim xsml As New SQLCommand '销售明细表
Dim ml As DataTable
Dim sCols() As String = {"本单单号","销售金额"}
Dim dCols() As String = {"本单单号","销售金额"}
xsml.C
xsml.CommandText = "查询语句过长,已确认语句无误,以此替代"
ml = xsml.ExecuteReader()
For Each dr As DataRow In ml.DataRows
If DataTables("销售主表").Find("(本单单号 = '" & dr("本单单号") & "'“) IsNot Nothing Then (请问老师,如何只合并与销售主表中是否检查列(逻辑列)已勾选(True)时对应行的本单单号相同的数据到销售明细表)
Dim nr As DataRow = DataTables("销售明细表").AddNew()
For i As Integer =0 To sCols.Length -1
nr(dCols(i)) = dr(sCols(i))
Next
End If
Next