T
Tony Williams
I have written two queries which total the same fields but I get two
different answers.
Here is Query1:
SELECT tblmaintabs.txtMonthlabel,
Sum([txtClientsdomfacsole]+[txtClientsdomidsole]+[txtClientsexpsole]+[txtClientsimpsole]+[txtstockfinsole]+[txtClientsABLsole])
AS [Sum Of txtTotNbrClientssole]
FROM tblmaintabs
GROUP BY tblmaintabs.txtMonthlabel
HAVING (((tblmaintabs.txtMonthlabel)=#9/1/2009#));
Here is Query2
SELECT tblmaintabs.txtMonthlabel, Sum(tblmaintabs.txtClientsdomfacsole) AS
SumOftxtClientsdomfacsole, Sum(tblmaintabs.txtClientsdomidsole) AS
SumOftxtClientsdomidsole, Sum(tblmaintabs.txtClientsexpsole) AS
SumOftxtClientsexpsole, Sum(tblmaintabs.txtClientsimpsole) AS
SumOftxtClientsimpsole, Sum(tblmaintabs.txtStockfinsole) AS
SumOftxtStockfinsole, Sum(tblmaintabs.txtClientsABLsole) AS
SumOftxtClientsABLsole
FROM tblmaintabs
GROUP BY tblmaintabs.txtMonthlabel
HAVING (((tblmaintabs.txtMonthlabel)=#9/1/2009#));
If I add the totals of Query 2 together they should give me the same answer
as Query 1 but they don't. I'm taking the same data from the same fields but
coming up with different totals.
Can anyone explain why?
Thanks
Tony
different answers.
Here is Query1:
SELECT tblmaintabs.txtMonthlabel,
Sum([txtClientsdomfacsole]+[txtClientsdomidsole]+[txtClientsexpsole]+[txtClientsimpsole]+[txtstockfinsole]+[txtClientsABLsole])
AS [Sum Of txtTotNbrClientssole]
FROM tblmaintabs
GROUP BY tblmaintabs.txtMonthlabel
HAVING (((tblmaintabs.txtMonthlabel)=#9/1/2009#));
Here is Query2
SELECT tblmaintabs.txtMonthlabel, Sum(tblmaintabs.txtClientsdomfacsole) AS
SumOftxtClientsdomfacsole, Sum(tblmaintabs.txtClientsdomidsole) AS
SumOftxtClientsdomidsole, Sum(tblmaintabs.txtClientsexpsole) AS
SumOftxtClientsexpsole, Sum(tblmaintabs.txtClientsimpsole) AS
SumOftxtClientsimpsole, Sum(tblmaintabs.txtStockfinsole) AS
SumOftxtStockfinsole, Sum(tblmaintabs.txtClientsABLsole) AS
SumOftxtClientsABLsole
FROM tblmaintabs
GROUP BY tblmaintabs.txtMonthlabel
HAVING (((tblmaintabs.txtMonthlabel)=#9/1/2009#));
If I add the totals of Query 2 together they should give me the same answer
as Query 1 but they don't. I'm taking the same data from the same fields but
coming up with different totals.
Can anyone explain why?
Thanks
Tony