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, November 26, 2018

Query to Weekend Dates Between Two Input Dates in Oracle

select
dt date,
to_char(TO_DATE(dt), 'DY') day
from (select
trunc(TO_DATE(:DATE_FROM)) + level - 1 dt
           from dual
     connect by trunc(TO_DATE(:DATE_FROM)) + level - 1 <= trunc(TO_DATE(:DATE_TO))
          )
where to_char(TO_DATE(dt), 'DY') in ('SAT','SUN')

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