• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 267
  • Last Modified:

Conversion to Oracle Queries

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


Informix-to-Oracle.docx
0
Nakuru1234
Asked:
Nakuru1234
  • 2
3 Solutions
 
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.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now