Conversion to Oracle Queries

Please can you help to convert these Informix queries to Oracle? TIA.


Informix-to-Oracle.docx
Nakuru1234Asked:
Who is Participating?
 
awking00Commented:
For the last day of last month -
select last_day(add_months(trunc(sysdate,'mm'),-1))
For case when Month(current) == 1 -
case when to_number(to_char(sysdate,'mm')) = 1
0
 
awking00Commented:
Last day actually does not need the trunc function -
select last_day(add_months(sysdate,-1))
0
 
johnsoneSenior Oracle DBACommented:
Why use 2 functions to determine the last day of the previous month?

select trunc(sysdate, 'mm') - 1 from dual;
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.