我使用inner join
和outer join
以下查询。执行此查询时,我得到重复的记录。我怎样才能获得独特的结果?
Select *
From DeliveryOrderMaster
Inner Join DeliveryOrder ON DeliveryOrderMaster.VoucherNo = DeliveryOrder.DONo
Inner Join Customer ON DeliveryOrderMaster.Code = Customer.ar_code
Left Outer Join tblbatchSerialNos On DeliveryOrder.DoNo = tblbatchSerialNos.VoucherNo And DeliveryOrder.StockCode = tblbatchSerialNos.ProductCode
Where DeliveryOrderMaster.VoucherNo= 'DO01304'
ORDER BY DeliveryOrder.DoNo ASC,DeliveryOrder.ID ASC
答案 0 :(得分:0)
没有内部或左侧连接的问题。问题可能是表的类型。您确定使用了正确的连接表键吗?你能给出一个wath返回查询的例子吗?