Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Rounding numbers to significant digits
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 - 12:00:08 CST
![]() |
![]() |