• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 265
  • 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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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