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 |
|
bridge
Yak Posting Veteran
93 Posts |
Posted - 2005-06-20 : 03:02:46
|
| I am calculating Yield as select (20/822)*100 in Query Analyzer but it returns 0. While the same formula in Excel return 2.433090024. Please help me int getting the correct value? |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-06-20 : 03:10:01
|
| You need to use decimal valuesselect (20.0/822.0)*100.0MadhivananFailing to plan is Planning to fail |
 |
|
|
bridge
Yak Posting Veteran
93 Posts |
Posted - 2005-06-20 : 03:11:56
|
| But if a query is returning integer values and I am using this calculation on two integer columns, then what I'll have to do |
 |
|
|
bridge
Yak Posting Veteran
93 Posts |
Posted - 2005-06-20 : 03:13:32
|
| ThanksI just did it by casting the columns to decimal |
 |
|
|
|
|
|