Guest User

Untitled

a guest
Jun 23rd, 2016
70
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     SELECT MP.DTMOVPROD,TM.TIPOMOV,MP.CODNAT,MP.CODVENDA,MP.CODCOMPRA,MP.CODPROD,eq.descprod,eq.codfisc,MP.TIPOMOVPROD,MP.DOCMOVPROD,MP.CODALMOX,MP.CODLOTE,MP.QTDMOVPROD,MP.PRECOMOVPROD,MP.ESTOQMOVPROD,MP.SLDMOVPRODAX,EQ.TIPOPROD,MP.CUSTOMPMMOVPRODAX,MP.SLDMOVPROD,MP.CUSTOMPMMOVPROD,MP.CODMOVPROD,MP.CODEMPTM,TM.CODEMP,MP.CODFILIALTM,TM.CODFILIAL,(MP.sldmovprod*MP.CUSTOMPMMOVPROD) SALDO,COALESCE(CLI.NOMECLI, FORN.RAZFOR) CODTIPOMOV FROM EQMOVPROD MP
  2.     LEFT JOIN EQTIPOMOV TM ON MP.CODEMPTM=TM.CODEMP
  3.     INNER JOIN EQPRODUTO eq ON mp.codprod = eq.codprod
  4.     INNER JOIN vdvenda vd ON mp.codvenda=vd.codvenda
  5.     INNER JOIN vdcliente cli ON vd.codcli = cli.codcli
  6.     INNER JOIN cpcompra cp ON mp.codcompra = cp.codcompra
  7.     INNER JOIN cpforneced forn ON cp.codfor = forn.codfor
  8.     WHERE MP.CODFILIALTM=TM.CODFILIAL AND MP.CODTIPOMOV=TM.CODTIPOMOV AND tipoprod='P'
RAW Paste Data