Hi guys
 
I am having a bit of a problem. I have the following query to sum the
amounts in a table :
select sum(amount) from transactionfile where sub_account = '6000' and
transactiondate >= '2004-02-1 00:00:00' and transactiondate <=
'2004-02-29 00:00:00' and amount >0 and transactionstatus = 0
 
The amount I get is 4152482.86.
 
However, if I run the following query :
select amount from transactionfile where sub_account = '6000' and
transactiondate >= '2004-02-1 00:00:00' and transactiondate <=
'2004-02-29 00:00:00' and amount >0 and transactionstatus = 0
 
which gives me the individual amounts and I manually sum them I get an
amount of 4152488.90 which is out by 6.04 in comparison to the first
query.
 
Does anyone know what could be causing this? Is it possible that it
might be a bad index?
 
Any help will be appreciated!
 
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.577 / Virus Database: 366 - Release Date: 2/3/2004
 

Reply via email to