Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT sum(CTB_LANCAMENTO_DIVIDIDO.VAL_DIVISAO) VALOR_DIVISAO
- FROM
- (CNP.CTB_LANCAMENTO CTB_LANCAMENTO
- INNER JOIN
- CNP.CTB_LANCAMENTO_DIVIDIDO CTB_LANCAMENTO_DIVIDIDO
- ON ((CTB_LANCAMENTO.EMPRESA=CTB_LANCAMENTO_DIVIDIDO.EMPRESA)
- AND (CTB_LANCAMENTO.ANO_MES=CTB_LANCAMENTO_DIVIDIDO.ANO_MES))
- AND (CTB_LANCAMENTO.LANCAMENTO=CTB_LANCAMENTO_DIVIDIDO.LANCAMENTO))
- INNER JOIN CNP.CTB_CONTA CTB_CONTA ON (CTB_LANCAMENTO.EMPRESA=CTB_CONTA.EMPRESA)
- AND (CTB_LANCAMENTO.CONTA=CTB_CONTA.CONTA)
- WHERE (CTB_LANCAMENTO.ANO_MES=201903)
- AND CTB_LANCAMENTO.CONTA = '31101003'
- AND CTB_LANCAMENTO.EMPRESA = 2
- AND CTB_LANCAMENTO_DIVIDIDO.REVENDA_DIVISAO = 2
- AND CTB_LANCAMENTO_DIVIDIDO.tipo_item = 'P'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement