• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 462
  • 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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
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

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

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