Join the OracleApps88 Telegram group @OracleApps88to get more information on Oracle EBS R12/Oracle Fusion applications.

If you are facing any issues while copying the Code/Script or any issues with Posts, Please send a mail to OracleApp88@Yahoo.com or message me at @apps88 or +91 905 957 4321 in telegram.

Monday, February 18, 2013

Date Between and Date Range query



SELECT A.PAYROW_DATE A,A.PAYROW_DATE B FROM (
select DISTINCT LAST_DAY(TO_DATE('30/SEP/2007','DD/MON/RRRR') + level) PAYROW_DATE
 from dual connect by level < (TO_DATE('30/SEP/2012','DD/MON/YYYY') -----Change this Date
 - TO_DATE('30/SEP/2007','DD/MON/YYYY'))
 ORDER BY 1 DESC
 )A


SELECT A.PAYROW_DATE A,A.PAYROW_DATE B FROM (
 select DISTINCT LAST_DAY(to_date(:start_date,'dd-mon-yyyy') + rownum -1) PAYROW_DATE
     from all_objects
    where rownum <=
to_date(:end_date,'dd-mon-yyyy')-to_date(:start_date,'dd-mon-yyyy')+1
 ORDER BY 1 DESC
 )A

No comments:

Post a Comment

If you are facing any issues while copying the Code/Script or any issues with Posts, Please send a mail to OracleApp88@Yahoo.com or message me at @apps88 or +91 905 957 4321 in telegram.
Best Blogger TipsGet Flower Effect