Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select
- t4.POID po_main_id,
- t3.ID po_detail_id,
- t4.cPOID po_code,
- t2.ID arr_main_id,
- t1.Autoid arr_detail_id,
- po_vendor.cVenName po_vendor,
- arr_vendor.cVenName arr_vendor,
- t1.cInvCode
- from PU_ArrivalVouchs t1
- LEFT JOIN PU_ArrivalVouch t2
- on t1.ID=t2.ID
- LEFT JOIN PO_Podetails t3
- on t1.iPOsID = t3.ID
- LEFT JOIN PO_Pomain t4
- on t3.POID=t4.POID
- LEFT JOIN Vendor po_vendor
- on po_vendor.cVenCode=t4.cVenCode
- LEFT JOIN Vendor arr_vendor
- on arr_vendor.cVenCode=t2.cVenCode
- where t4.cVenCode!=t2.cVenCode
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement