AccessHelp said:
:
I am creating a SQL query for my report. The problem is when I sum the
transactions in SQL query, the total number comes out different from the
total number that I don't sum in SQL query.
Does anyone know why?
Thanks.
KARL DEWEY said:
Please post your SQL statement and tell us how you are totaling the number
without the SQL.
Hi Karl,
Thanks Karl. I took the numbers (both sum and non-sum) from [Total Accum
Time] and totaled those numbers. The total number didn't come out the same.
Here is my SQL statement:
<snip>
AccessHelp,
The query, realigned for readability (when this posts to the
newsgroup, there will be line-wraps, my apologies):
SELECT qryBilling_Summary.[Aff Group]
,qryBilling_Summary.[Client ID]
,qryBilling_Summary.[Client Legal Name]
,Sum(qryBilling_Summary.[Total Accum Time]) AS [SumOfTotal
Accum Time]
,Sum(qryBilling_Summary.[Interim Amount Billed]) AS
[SumOfInterim Amount Billed]
,Sum([Interim Amount Billed]-[Total Accum Time]) AS [Diff of
Interim & Actual]
FROM qryBilling_Summary
GROUP BY qryBilling_Summary.[Aff Group]
,qryBilling_Summary.[Client ID]
,qryBilling_Summary.[Client Legal Name]
HAVING (((qryBilling_Summary.[Aff Group]) Like nz([Please Enter
Aff Group],"*"))
AND ((qryBilling_Summary.[Client ID]) Like nz([Please Enter
Client ID],"*"))
AND ((Sum(qryBilling_Summary.[Interim Amount Billed]))=0));
What is your sample data?
What values are you entering at the prompts?
What are the results you are getting?
What do you mean by "non-sum"?
Sincerely,
Chris O.