Reet
Right there with Babe
Points: 747
More actions
July 19, 2006 at 9:30 am
#113733
Hi,
Is there anyway of rounding a float value such as 88.125 to 88.13?
I used teh function round(88.125, 2) however this gave me the value 88.129999999999995. How do I just get it to return a value of two decimal places?
Cheers
RyanRandall
SSChampion
Points: 13623
July 19, 2006 at 9:55 am
#650153
You can cast it as a decimal...
declare @x float
set @x = 88.125
select @x, cast(@x as decimal(8, 2))
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
July 19, 2006 at 10:07 am
#650157
Ryan,
You're a star! Thank you very much - worked a treat!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply