- Código: Selecionar tudo
select distinct cast(venda_data_hora as date), ECF from cab_vendas
where ecf is not null
and cast(venda_data_hora as date) between [b]'2009-01-01' [/b]and[b] '2009-12-31'[/b]
and ecf not in (select caixa from registro60
where data=cast(cab_vendas.venda_data_hora as date))
order by venda_data_hora
Data que deseja verificar está em negrito.
