Advertisement
Pandaaaa906

Untitled

Feb 24th, 2021
1,611
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.52 KB | None | 0 0
  1. select
  2.  
  3. t4.POID po_main_id,
  4. t3.ID po_detail_id,
  5. t4.cPOID po_code,
  6.  
  7. t2.ID arr_main_id,
  8. t1.Autoid arr_detail_id,
  9.  
  10. po_vendor.cVenName po_vendor,
  11. arr_vendor.cVenName arr_vendor,
  12. t1.cInvCode
  13.  
  14. from PU_ArrivalVouchs t1
  15.  
  16. LEFT JOIN PU_ArrivalVouch t2
  17. on t1.ID=t2.ID
  18.  
  19. LEFT JOIN PO_Podetails t3
  20. on t1.iPOsID = t3.ID
  21.  
  22. LEFT JOIN PO_Pomain t4
  23. on t3.POID=t4.POID
  24.  
  25. LEFT JOIN Vendor po_vendor
  26. on po_vendor.cVenCode=t4.cVenCode
  27.  
  28. LEFT JOIN Vendor arr_vendor
  29. on arr_vendor.cVenCode=t2.cVenCode
  30.  
  31. where t4.cVenCode!=t2.cVenCode
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement