SQL 嵌套子查询差集运算

rs2.Open "select 商品条码  from  da_sp where   商品条码 not in(select 商品条码 from DA_QDL    ) ORDER  by 商品条码 ", cn, 1, 1 '嵌套子查询差集运算
                          If rs2.RecordCount > 0 Then
                               For j = 0 To rs2.RecordCount - 1
                                    If rs2.EOF = False Then
                                        j商品条码 = rs2.Fields("商品条码")
                                        S起订数量 = 0
                                        s包装数量规格 = 0
                                        cn.Execute ("insert into DA_QDL values('" & j商品条码 & "'," & S起订数量 & "," & s包装数量规格 & ",'" & j最后修改时间 & "' )")
                                    End If
                                    rs2.MoveNext
                                Next j
                            End If
                        rs2.Close

你可能感兴趣的:(SQL 嵌套子查询差集运算)