Solved

ORACLE ROUNDING

Posted on 2013-01-30
6
453 Views
Last Modified: 2013-01-30
is there a oracle function to convert

a) 2.0718  =>  2.08  and
b) 2.0700  =>  2.07  

thanks
0
Comment
Question by:eoswin
  • 2
  • 2
  • 2
6 Comments
 
LVL 23

Expert Comment

by:David
ID: 38836686
0
 

Author Comment

by:eoswin
ID: 38836694
oracle round function does not work for this case
0
 
LVL 32

Expert Comment

by:awking00
ID: 38836737
select ceil(number*100)/100
0
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.

 
LVL 32

Accepted Solution

by:
awking00 earned 500 total points
ID: 38836748
SQL> select ceil(2.0700*100)/100 from dual;
CEIL(2.0700*100)/100
--------------------
                2.07

SQL> select ceil(2.0718*100)/100 from dual;
CEIL(2.0718*100)/100
--------------------
                2.08
0
 

Author Closing Comment

by:eoswin
ID: 38836779
works great..thanks
0
 
LVL 23

Expert Comment

by:David
ID: 38836816
A second look then, suggests you want a zero placeholder to supress trailing zeros, but a non-zero value always rounds up to the next increment.  Correct?

If so then no, nothing I'm immediately able to put my finger on -- but am I on the right track now?
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

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

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

15 Experts available now in Live!

Get 1:1 Help Now