Solved

Conversion to Oracle Queries

Posted on 2011-03-16
3
254 Views
Last Modified: 2012-06-21
Please can you help to convert these Informix queries to Oracle? TIA.


Informix-to-Oracle.docx
0
Comment
Question by:Nakuru1234
  • 2
3 Comments
 
LVL 32

Accepted Solution

by:
awking00 earned 400 total points
ID: 35147989
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
 
LVL 32

Assisted Solution

by:awking00
awking00 earned 400 total points
ID: 35148010
Last day actually does not need the trunc function -
select last_day(add_months(sysdate,-1))
0
 
LVL 34

Assisted Solution

by:johnsone
johnsone earned 100 total points
ID: 35148213
Why use 2 functions to determine the last day of the previous month?

select trunc(sysdate, 'mm') - 1 from dual;
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
What is the version of ojdbc6.jar 2 39
Query Records that don't match 8 34
Web Service from a stored procdure oracle 10 49
Shredding xml into an oracle 11g Database 2 25
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now