Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select a.nroempresa, a.seqproduto,max(a.seqmovtoestq)
- from mrl_lanctoestoque a, mrl_local o, mrl_produtoempresa p
- where a.nroempresa = o.nroempresa
- and a.nroempresa = p.nroempresa
- and a.seqproduto = p.seqproduto
- and a.local = o.seqlocal
- and p.estqtroca > 07
- and o.status = 'A'
- and o.local = 'TROCA'
- and a.tiplancto = 'E'
- and a.tipusocgo = 'I'
- group by a.nroempresa, a.seqproduto
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement