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 |
|
a.ashabi
Posting Yak Master
117 Posts |
Posted - 2009-07-06 : 18:05:12
|
| Hi.I'd like to get rid of the last 2 digits on my money field.which means if the values are : 123.456 5.5645.456912.2I need these results:12.455.5645.4512.2plz help thanks |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-07-06 : 18:16:28
|
round(col, 2)orconvert(decimal(10,2), col) KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
a.ashabi
Posting Yak Master
117 Posts |
Posted - 2009-07-06 : 18:27:22
|
| thank u so much :) |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-07-07 : 02:15:39
|
| select data,round(data,2),convert(decimal(10,2), data),cast(cast(data*100 as int)/100.0 as decimal(12,2)) from(select cast('123.456' as decimal(12,3) )as data union allselect '5.56' union allselect '45.4569' union allselect '12.2' )m MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|