in a report i need to show all dates from range
1. 1 ~ 15
2. 15 to last date of the month
note start date and end date is taken dynamically through report paramets
Oracle Certified Professional
System Analist , D.B.A
date range problam
You can use lexical to build where query and on parameter selection you should select option 1 or option 2. Now in the pre report trigger you have to do like,
if option 1
v_query := between 1 and 15;
else
v_query := between 16 and last_day(sysdate);
end if
Here is the use of last_day example,
SQL> select last_day(to_date('15/02/2006')), last_day(sysdate) from dual;
LAST_DAY(T LAST_DAY(S
---------- ----------
28/02/2006 30/04/2006
if still issue not resolved then let us know.
if option 1
v_query := between 1 and 15;
else
v_query := between 16 and last_day(sysdate);
end if
Here is the use of last_day example,
SQL> select last_day(to_date('15/02/2006')), last_day(sysdate) from dual;
LAST_DAY(T LAST_DAY(S
---------- ----------
28/02/2006 30/04/2006
if still issue not resolved then let us know.
Who is online
Users browsing this forum: No registered users and 0 guests