08 Mar 2006
To add more on this
select current_date;
03/08/2006
select extract(day from date-1);
7
select current_date-extract(day from date-1 );
03/01/2006
select current_date-extract(day from date);
02/28/2006
I think the last query will give you the correct results
You must sign in to leave a comment.

Hi all,
I want to retrieve last 3 months data from a table,in which datas are loading daily. I have a query but it is retrieving last 3months data + data loaded till current day.But I need only last 3 months data. For example if i am running that job on oct 5 it should retrieve july,august,Sep data. But my SQLquery is retrieving these 3 months data + Oct1,2,3,4 datas also. Please help me to resolve this problem.
Thanks
------------------------------------------------------ --------------------------