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 |
ryanlcs
Yak Posting Veteran
62 Posts |
Posted - 2010-01-28 : 21:27:31
|
How can I get the result with decimal place? The following will return 33.00, but how can I get the result of 33.33?select cast((100/3) as decimal(10,2)) as ResultThank You. |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2010-01-28 : 23:51:10
|
[code]select 100.0 / 3or multiply it with 1.0select 100 * 1.0 / 3[/code] KH[spoiler]Time is always against us[/spoiler] |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
nitookatyal
Starting Member
4 Posts |
Posted - 2010-01-29 : 04:26:13
|
select cast(cast(100 as decimal)/3 as decimal(10,2)) as ResultNitoo katyalSoftware Engineer |
|
|
|
|
|