abhas
SSCarpal Tunnel
Points: 4681
More actions
October 22, 2013 at 9:59 am
#395705
Hi All,
I want to round decimals to nearest whole number.
eg. if value is equal to or greater than .5 then it should display next whole number.
eg. 1) if value is 10.50 then it should be 11
2) if value is 10.49 then it should be 10
thanks
Abhas.
davidandrews13
SSCertifiable
Points: 6809
October 22, 2013 at 10:20 am
#1660600
SELECT CONVERT(INT,ROUND(10.50,0))
SELECT CONVERT(INT,ROUND(10.49,0))
Dhruvesh Shah
SSCrazy
Points: 2303
October 22, 2013 at 4:41 pm
#1660756
SELECT CONVERT(INT,ROUND(<YourColumnName>,0)) FROM <yourtable>
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply