Advertisement
Pandaaaa906

Untitled

Jan 3rd, 2023
1,811
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.56 KB | None | 1 0
  1. SELECT
  2.  
  3. rd08_m.cCode,
  4. rd08_m.dDate,
  5. rd08_m.cWhCode,
  6. rd08_d.cInvCode,
  7. rd08_d.cBatch,
  8. rd08_d.cFree1,
  9. rd08_d.iQuantity,
  10. rd09_m.cCode
  11.  
  12. FROM rdrecords08 rd08_d
  13.  
  14. LEFT JOIN RdRecord08 rd08_m
  15. ON rd08_d.ID = rd08_m.ID
  16.  
  17. LEFT JOIN rdrecords09 rd09_d
  18. ON rd09_d.cInvCode = rd08_d.cInvCode
  19. AND rd09_d.cBatch = rd08_d.cBatch
  20.  
  21. LEFT JOIN RdRecord09 rd09_m
  22. ON rd09_d.ID = rd09_m.ID
  23.  
  24. WHERE rd08_m.cRdCode = '0110'
  25. AND rd08_d.cInvCode like 'YF%'
  26. AND rd08_m.cWhCode = '09'
  27. AND DATEPART(hh, rd08_m.dnmaketime) = 0
  28. -- AND rd08_m.dnmaketime = rd08_m.dnverifytime
  29. --
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement