Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
mike123
Master Smack Fu Yak Hacker
1462 Posts |
Posted - 2007-04-24 : 17:26:07
|
| Hi,Just wondering if theres an option in SQL I don't know about. I am doing a select statment that just grabs a single column/row.For instance an integer such as "123457" I want to round to the nearest thousand and bring back a result such as "123000". Is there an easy built in way to do this in SQL server or should I just do this rounding in my web app?Thanks !mike123 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-04-24 : 17:31:04
|
| You can do it in the web app, or you can check out the ROUND function in BOL.Tara Kizerhttp://weblogs.sqlteam.com/tarad/ |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-04-24 : 18:57:20
|
[code]select round(123457, -3)[/code] KH |
 |
|
|
mike123
Master Smack Fu Yak Hacker
1462 Posts |
Posted - 2007-04-25 : 00:05:26
|
| perfect , thX !:) |
 |
|
|
|
|
|