-
Fairly Simple Query
Im running the following query to a MS ACCESS 2007 Database:
"SELECT CustomerID, SUM(AmountToPay) As AmountOwing, SUM(AmountPaid) As PaidOff FROM Orders, Payment WHERE Orders.CustomerID = Payment.CustID AND CustomerID = 20202 GROUP BY CustomerID;"
I dont get the right amounts for AmountOwing, and PaidOff, which are the SUMs. The answer is DOUBLE what it should be for both and I cant work out why. Thanks for any help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|