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 |
|
eurob
Posting Yak Master
100 Posts |
Posted - 2006-01-09 : 13:38:54
|
Before grouping this select statement gives a result:10.05 (single rows added up)SELECT count(A.auditid) * CAST(sum(totalerrors) as decimal(9,2)) / SUM(totalitems) as [errors]from Audits AWHERE A.CycleID = 36 AND A.formid = 1002 After I group it on A.Clientid it gives me: 12.33.I really wonder why this is happening...Any ideas ?robert |
|
|
eurob
Posting Yak Master
100 Posts |
Posted - 2006-01-09 : 14:29:11
|
I know that it is something in the rounding, 12.33 would be correct with these values:0.3243243240.270270270.1351351350.682.9488167311.9729729731.0270270270.2432432430.9189189191.4054054050.6486486490.8108108110.945945946-----------12.33151943 robert |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-01-09 : 15:08:29
|
| You are going to need to provide us the CREATE TABLE statement for the table, INSERT INTO statements for sample data (for us to play with), and the expected result set using that sample data.Tara Kizeraka tduggan |
 |
|
|
|
|
|