Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. select
  2. FAA_REF as referencia,
  3. OPG_IMP as import,
  4. OPG_FRE as data,
  5. OPG_TXT as concepte,
  6. FAA_IMP as import_pagat
  7. from OPG, FAA, TER
  8. where
  9. OPG_NUM = FAA_OPD and
  10. OPG_ITE = TER_ITE and
  11. TER_DOC = '#{nif_proveidor}' and
  12. OPG_OPE in ('220', '230')
  13.  
  14. union
  15.  
  16. select
  17. IAG_REF as referencia,
  18. OPG_IMP as import,
  19. OPG_FRE as data,
  20. OPG_TXT as concepte,
  21. IAG_IMP as import_pagat
  22. from OPG, IAG, TER
  23. where
  24. OPG_NUM = IAG_ASC and
  25. OPG_ITE = TER_ITE and
  26. TER_DOC = '#{nif_proveidor}' and
  27. OPG_OPE in ('220', '230') and
  28. IAG_SGN = 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement