Advertisement
geracino

vw acordos gerados

Aug 25th, 2023
1,129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.49 KB | Source Code | 0 0
  1. CREATE OR REPLACE VIEW cboxv_acordogerado_auto AS
  2. SELECT e.nomereduzido Empresa , cc.nroacordo , cc.seqfornecedor||' - '||g.nomerazao  fornecedor, x.apelido comprador FROM msu_acordopromoc cc,ge_pessoa g, max_empresa e, max_comprador x
  3. WHERE cc.nroempresa  = e.nroempresa
  4. AND   cc.seqcomprador = x.seqcomprador
  5. AND   cc.seqfornecedor = g.seqpessoa
  6. AND   cc.dtaemissao = trunc(sysdate)
  7. AND   cc.situacaoacordo = 'F'
  8. AND   cc.usuinclusao = 'Automatico'
  9. ORDER BY cc.seqcomprador, cc.nroempresa;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement