Subject | Rounding numbers in a stored procedure |
---|---|
Author | flipmooooo |
Post date | 2006-04-12T17:36:01Z |
Hi,
I'm doing some calculations in a stored procedure and i want to round
the calculated results on 2 decimals but not using the baker rounding
methode.
I think i'll have to write a new UDF fucntion, but i would prefer not
to. Is there any other function available to obtain the results below
shown in the example.
Example:
Round on 2 decimals: Round up if 3the decimal part greater or equal to
5.
12.34 / 25 = 0,4936 > 0,49
12.34 / 27 = 0,45703703703703703703703703703704 > 0,46
Greetings,
Filip Moons
I'm doing some calculations in a stored procedure and i want to round
the calculated results on 2 decimals but not using the baker rounding
methode.
I think i'll have to write a new UDF fucntion, but i would prefer not
to. Is there any other function available to obtain the results below
shown in the example.
Example:
Round on 2 decimals: Round up if 3the decimal part greater or equal to
5.
12.34 / 25 = 0,4936 > 0,49
12.34 / 27 = 0,45703703703703703703703703703704 > 0,46
Greetings,
Filip Moons