Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Rounding numbers to significant digits

Re: Rounding numbers to significant digits

From: justme <paulq_at_rogers.com>
Date: Wed, 06 Nov 2002 00:46:17 GMT
Message-ID: <tDZx9.201549$%h2.127343@news02.bloor.is.net.cable.rogers.com>


write a function

"rilecode" <rilecode_at_chemist.com> wrote in message news:bd18bdcd.0211051000.5b4a2d1c_at_posting.google.com...
> I am trying to round numbers to 3 significant digits, no matter where
> the decimal is placed. I can bin the numbers into groups and use a
> separate round function for each bin, however, this method seems ugly.
> Oracle stores the data in scientific notation, does Oracle have a way
> to round on scientific notation. Here is an example data set: The
> left side is what is in the database, the right side is what I want to
> have in the database.
>
>
> 0.00057593657984145 0.000576
> 0.0160203850509626 0.0160
> 0.00782930917327293 0.00783
> 10.855832389580974 10.9
> 251.497046432616080 251
> 0.0509346953666545 0.0510
> 1.339710636373912 1.34
> 20.203388719339889 20.2
> 0.00675144116649712 0.00675
> 0.0418077518192264 0.0418
> 0.00000303206625813864 0.00000303
> 2.729014132516280 2.73
> 0.851564387096774 0.852
>
>
> I appreciate all solutions.
>
> Rilecode
Received on Tue Nov 05 2002 - 18:46:17 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US