Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Fixing 'first_day' function

Lin_PAug 15 2022

Hello, I'm converting old O11 SQLs to be used in Cloud.
This particular query uses a nonexistent function of 'first_day' but I'm not sure what to replace it with since I'm still a novice in SQL. Any pointers? Thank you.
-----------------
Where
to_monthyear(conversion_date) = (
case
when to_number(to_char(SYSDATE,'DD'))>=15 then to_monthyear(last_day(sysdate)+1)
when to_number(to_char(SYSDATE,'DD'))<15 then to_monthyear(FirstDay(sysdate))
end

This post has been answered by BluShadow on Aug 16 2022
Jump to Answer
Comments
Post Details
Added on Aug 15 2022
5 comments
586 views