Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 461
  • 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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