P
Pete P.
I use a query to generate individual P.O.s for ordering items. Usually each
order has only one acct.#, but ocasionally there are multiple acct. #'s and I
need to know the totals for each acct.#. The query that I use for this
purpose uses the following SQL:
SELECT [Accounts Query].Total, [Accounts Query].AccountNumber, [Accounts
Query].AccountID
FROM [Accounts Query] INNER JOIN [Purchase Orders Query] ON [Accounts
Query].PurchaseOrderID = [Purchase Orders Query].PurchaseOrderID
ORDER BY [Accounts Query].AccountNumber;
When I run the query it gives me 2 entries for each item recorded in the
specified P.O. (based on the P.O. ID that I've saved in the Purchase Orders
Query). If I use the sum function to create a total dollar figure it returns
a figure that is 2, 3, or 4x's greater than it should based on the number of
entries in the original P.O.
How can I re-write the SQL to retrieve only single entries and get the
proper TOTAL for my Account Query Total? Thanl you for any suggestions given.
order has only one acct.#, but ocasionally there are multiple acct. #'s and I
need to know the totals for each acct.#. The query that I use for this
purpose uses the following SQL:
SELECT [Accounts Query].Total, [Accounts Query].AccountNumber, [Accounts
Query].AccountID
FROM [Accounts Query] INNER JOIN [Purchase Orders Query] ON [Accounts
Query].PurchaseOrderID = [Purchase Orders Query].PurchaseOrderID
ORDER BY [Accounts Query].AccountNumber;
When I run the query it gives me 2 entries for each item recorded in the
specified P.O. (based on the P.O. ID that I've saved in the Purchase Orders
Query). If I use the sum function to create a total dollar figure it returns
a figure that is 2, 3, or 4x's greater than it should based on the number of
entries in the original P.O.
How can I re-write the SQL to retrieve only single entries and get the
proper TOTAL for my Account Query Total? Thanl you for any suggestions given.