Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I round a number to five?

Status
Not open for further replies.

lwilly

Technical User
Apr 11, 2000
84
0
0
US
Could someone give me an idea of how I can round numbers to the nearest five in a select statement?
Thank you,
Any help would be appreciated.
 
Code:
declare @x numeric(10,2)
set @x=7.5
select round(@x/5,0)*5
 
Thank you both for the quick replies, I have been scratching around trying to get this and all along it was because my field was an int so it was always rounding down.
Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top