Solved

Conversion to Oracle Queries

Posted on 2011-03-16
3
253 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 31

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 31

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.

Join & Write a Comment

Suggested Solutions

Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

758 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

27 Experts available now in Live!

Get 1:1 Help Now