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 |
|
jjmoss1234
Starting Member
11 Posts |
Posted - 2009-12-02 : 05:09:16
|
| If I do a standard sum in SQL 2005, SELECT 821 / 825 * 100, I get the result of 0. is there a way I can get the required result which is 99.5? many thanks |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-12-02 : 05:33:19
|
select 821.0 / 825 * 100orselect 821 * 100.0 / 825 KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
kbhere
Yak Posting Veteran
58 Posts |
Posted - 2009-12-02 : 05:46:04
|
| SELECT 1.0 * 821 / 825 * 100;Multiply the value with 1.0Value multiplied by 1 will always same..Balaji.K |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
jjmoss1234
Starting Member
11 Posts |
Posted - 2009-12-02 : 12:14:21
|
| Thankyou very much MadhivananThis turned out to be the reason, I added a float conversion and all is now well!!Many thanks John |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-12-03 : 01:13:28
|
quote: Originally posted by jjmoss1234 Thankyou very much MadhivananThis turned out to be the reason, I added a float conversion and all is now well!!Many thanks John
You are welcome MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|