Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Conversion to Oracle Queries

Posted on 2011-03-16
3
Medium Priority
?
262 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 1600 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 1600 total points
ID: 35148010
Last day actually does not need the trunc function -
select last_day(add_months(sysdate,-1))
0
 
LVL 35

Assisted Solution

by:johnsone
johnsone earned 400 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
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 connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
Suggested Courses

885 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