Solved

ORACLE ROUNDING

Posted on 2013-01-30
6
458 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
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…
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 configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

751 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