Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 463
  • Last Modified:

ORACLE ROUNDING

is there a oracle function to convert

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

thanks
0
eoswin
Asked:
eoswin
  • 2
  • 2
  • 2
1 Solution
 
DavidSenior Oracle Database AdministratorCommented:
0
 
eoswinAuthor Commented:
oracle round function does not work for this case
0
 
awking00Commented:
select ceil(number*100)/100
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
awking00Commented:
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
 
eoswinAuthor Commented:
works great..thanks
0
 
DavidSenior Oracle Database AdministratorCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

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.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now