var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Query - with date in where clause
I'm trying to run a query to return values from the 10th of last month to the 9th of this month, whenever it is ran. I tried add_months but it is giving me records from a month ago e.g.
where hire_date >= add_months(sysdate,-1)
I need the query to return value from 10th of last month to 9th of this month no matter when it is ran.Even when the query is ran on the 12th
It pays to share!
select name, dept, age
where hire_date between
last_day(add_months(sysdate, -2)) + 10
last_day(add_months(sysdate, -1)) + 9