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 |
|
jmantheiy
Starting Member
3 Posts |
Posted - 2007-05-24 : 08:48:39
|
| I am getting incorrect results back when I do the following query and not really sure why. Below is the query and some additional details.query: 100*((ACT_AHT - FC_AHT) / FC_AHT)calc: 100*((347.6 - 316.479) / 316.479)expect result rounded = 9.83actual result rounded = -8.47All fields are defined as floats. The error seems to happen when I add the divide by.Joe [url]http://www.ilearneditonline.com[/url] |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-05-24 : 08:59:06
|
| hmm....SELECT 100*((347.6 - 316.479) / 316.479)gives 9.8335118600 to me...are you sure you are looking at correct data?_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
 |
|
|
jmantheiy
Starting Member
3 Posts |
Posted - 2007-05-24 : 09:05:27
|
| I am absolutely positive I am looking at the right data. That is why I am asking for help. I don't have a clue where to go from here. |
 |
|
|
jmantheiy
Starting Member
3 Posts |
Posted - 2007-05-24 : 09:16:35
|
| Sorry, I found my problem. ACT_AHT and FC_AHT were numbers I had to calculate to get the actual numbers. My calc should have been 100*(((ACT_AHT/ACT_CALLS) - (FC_AHT/FC_CALLS)) / (FC_AHT/FC_CALLS))Blog: [url]http://www.ilearneditonline.com[/url] |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-05-24 : 09:28:34
|
see... your data was flawed _______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
 |
|
|
|
|
|