Advertisement
geracino

script 01

Jul 13th, 2023
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. select a.nroempresa, a.seqproduto,max(a.seqmovtoestq)
  2. from mrl_lanctoestoque a, mrl_local o, mrl_produtoempresa p
  3. where a.nroempresa = o.nroempresa
  4. and a.nroempresa = p.nroempresa
  5. and a.seqproduto = p.seqproduto
  6. and a.local = o.seqlocal
  7. and p.estqtroca > 07
  8. and o.status = 'A'
  9. and o.local = 'TROCA'
  10. and a.tiplancto = 'E'
  11. and a.tipusocgo = 'I'
  12.  
  13. group by a.nroempresa, a.seqproduto
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement