View Single Post
Old 22-Oct-2007, 12:29 AM   #2 (permalink)
Anilrgowda
Administrator
 
Anilrgowda's Avatar

Posts: 18,715
Join Date: Jan 2006
Rep Power: 10 Anilrgowda is on a distinguished road

IM:
Default Re: Removing decimal places from a number SQL Server 2000

Depends how you want to remove the decimal places. If you want to round DOWN to the nearest whole number, use the FLOOR function. FLOOR(113.23) will return 113

If you want to ROUND UP to the nearest whole number use CEILING. CEILING(113.32) will return 114

If you want to round up OR down depending on the size of the decimal part, use the ROUND function. ROUNG(112.23) will return 112 and ROUND(112.89) will return 113


------------------


Anilrgowda is offline   Reply With Quote