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 |
|
shagil.a.gopinath
Starting Member
14 Posts |
Posted - 2010-04-25 : 09:13:18
|
| Hi, friendsMy query output is 45.7829474, i need to get the output as 45.78, remaining part should be truncated. Is there any function sql to do this ?Thanks and regardsshagil |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2010-04-25 : 09:15:04
|
round(45.7829474, 2) KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
ms65g
Constraint Violating Yak Guru
497 Posts |
Posted - 2010-04-25 : 09:17:33
|
| select cast(field as decimal(18,2)) from table_name |
 |
|
|
shagil.a.gopinath
Starting Member
14 Posts |
Posted - 2010-04-25 : 09:25:55
|
| select cast(field as decimal(18,2)) from table_namethis method works well, by using round remaining all the value will be zero.Thanks for your help friends |
 |
|
|
ms65g
Constraint Violating Yak Guru
497 Posts |
Posted - 2010-04-25 : 09:32:35
|
quote: Originally posted by shagil.a.gopinath select cast(field as decimal(18,2)) from table_namethis method works well, by using round remaining all the value will be zero.Thanks for your help friends
you are welcome |
 |
|
|
|
|
|