Posts

Showing posts from December, 2013

Oracle - SQL - Retornar registros entre incio del ano passado y el proximo

SoluciĆ³n:

select * from <TABLA> where <CAMPO> between to_date('0101' || to_char(trunc(sysdate, 'YEAR')-1, 'YYYY'), 'DDMMYYYY') AND to_date('3112' || to_char(trunc(sysdate, 'YEAR')+1, 'YYYY'), 'DDMMYYYY')