Statement #1
-------------------------------------------------------------
select * from tbentradas where data between :di and :df



Statement #2
-------------------------------------------------------------
select coalesce(m.cod_mun_ibge,'0000000') as cidade from ibge_municipios m, ibge_uf_estado e, tbforn f where f.cod = :cod and e.uf = f.uf and m.cod_uf_ibge = e.codigo_uf_ibge and
(upper(m.municipio) starting with upper(f.cidade))
union
select coalesce(m.cod_mun_ibge,'0000000') as cidade from ibge_municipios m, ibge_uf_estado e, tbclientes c where c.cod = :cod and e.uf = c.uf and m.cod_uf_ibge = e.codigo_uf_ibge and
(upper(m.municipio) starting with upper(c.cidade))



Statement #3
-------------------------------------------------------------
select coalesce(m.cod_mun_ibge,'0000000') as cidade from ibge_municipios m, ibge_uf_estado e, tbforn f where f.cod = :cod and e.uf = f.uf and m.cod_uf_ibge = e.codigo_uf_ibge and
(upper(m.municipio) starting with upper(f.cidade))



Statement #4
-------------------------------------------------------------
select coalesce(m.cod_mun_ibge,'0000000') as cidade from ibge_municipios m, ibge_uf_estado e, tbforn f where f.cod = :cod and e.uf = f.uf and m.cod_uf_ibge = e.codigo_uf_ibge and
(upper(m.municipio) LIKE upper('%'||f.cidade||'%'))



Statement #5
-------------------------------------------------------------
SELECT c.valorprincipal, v.valorbruto from tbvendas v inner join tbcrediario c on v.doc = c.cod  where v.data between :di and :df order by v.data, v.hora



Statement #6
-------------------------------------------------------------
SELECT c.valorprincipal, v.valorbruto from tbvendas v inner join tbcrediario c on v.cod = c.documento  where v.data between :di and :df order by v.data, v.hora



Statement #7
-------------------------------------------------------------
SELECT c.valorprincipal, v.valorbruto from tbvendas v inner join tbcrediario c on v.cod = c.documento  where v.data between :di and :df and v.tipo = 'CREDIARIO' order by v.data, v.hora



Statement #8
-------------------------------------------------------------
SELECT v.COD from tbvendas v where v.data between :di and :df and v.tipo = 'CREDIARIO' order by v.data, v.hora



Statement #9
-------------------------------------------------------------
SELECT v.COD, V.valorprincipal from tbCREDIARIO v where v.data between :di and :df order by v.data, v.hora



Statement #10
-------------------------------------------------------------
SELECT v.COD, V.valorliquido from tbvendas v where v.data between :di and :df and v.tipo = 'CREDIARIO' order by v.data, v.hora



Statement #11
-------------------------------------------------------------
SELECT v.documento, V.valorprincipal from tbCREDIARIO v where v.data between :di and :df order by v.data, v.hora



Statement #12
-------------------------------------------------------------
SELECT c.valorprincipal, v.valorbruto from tbvendas v inner join tbcrediario c on v.cod = c.numerodoc where v.data between :di and :df and v.tipo = 'CREDIARIO' order by v.data, v.hora



Statement #13
-------------------------------------------------------------
SELECT c.valorprincipal, v.valorbruto from tbvendas v inner join tbcrediario c on v.cod = c.numerodoc where v.data between :di and :df and v.tipo = 'CREDIARIO' AND c.valorprincipal <> v.valorbruto ORDER by v.data, v.hora



Statement #14
-------------------------------------------------------------
SELECT c.valorprincipal, v.valorbruto from tbvendas v inner join tbcrediario c on v.cod = c.numerodoc where v.data between :di and :df and v.tipo = 'CREDIARIO' AND c.valorprincipal <> v.valorliquido ORDER by v.data, v.hora



Statement #15
-------------------------------------------------------------
SELECT c.valorprincipal, v.valorbruto, V.entrada from tbvendas v inner join tbcrediario c on v.cod = c.numerodoc where v.data between :di and :df and v.tipo = 'CREDIARIO' AND c.valorprincipal <> v.valorliquido ORDER by v.data, v.hora



Statement #16
-------------------------------------------------------------
SELECT c.valorprincipal, (v.valorliquido + V.entrada) as vALOR from tbvendas v inner join tbcrediario c on v.cod = c.numerodoc where v.data between :di and :df and v.tipo = 'CREDIARIO' AND c.valorprincipal <> v.valorliquido ORDER by v.data, v.hora



Statement #17
-------------------------------------------------------------
SELECT c.valorprincipal, (v.valorliquido - V.entrada) as vALOR from tbvendas v inner join tbcrediario c on v.cod = c.numerodoc where v.data between :di and :df and v.tipo = 'CREDIARIO' AND c.valorprincipal <> v.valorliquido ORDER by v.data, v.hora



Statement #18
-------------------------------------------------------------
SELECT c.valorprincipal, (v.valorliquido - V.entrada) as vALOR from tbvendas v inner join tbcrediario c on v.cod = c.numerodoc where v.data between :di and :df and v.tipo = 'CREDIARIO' AND c.valorprincipal <> (v.valorliquido - V.entrada) ORDER by v.data, v.hora



