• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 464
  • 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
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
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

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

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