I'm having an SQL query that should bring me only the records whose date is greater than the date of the day, plus is coming records with the current date. Thanks!
--não deveria mostrar a data de hoje
select a.datavencimento from TB_RECEBIMENTO a
left outer join tb_plano_contas b on a.controleplano = b.controleplano
left outer join tb_cliente_fornecedor d on a.controlecliente = d.controlecliente
where getdate() > a.datavencimento
and a.statusregistro = 'A'
and b.tipododocumento = 'C'
and a.controleempresa = '1'
order by a.datavencimento asc
Result:
2015-04-27 00:00:00.000
2015-04-27 00:00:00.000
2015-04-27 00:00:00.000
2015-04-28 00:00:00.000
2015-04-28 00:00:00.000
2015-04-28 00:00:00.000
2015-04-28 00:00:00.000
2015-04-28 00:00:00.000