
Originally Posted by
June7
Only problem I had with the query was a circular reference on the Saved field. The following worked:
SELECT Amount.Item, Amount.Date, Supply.Supply, Supply.Purchaser, Supply.Location, Sum(Amount.Cost) AS SumOfCost, Sum(Amount.Spend) AS SumOfSpend, Sum(Nz([Saved],0)) AS SavedAmt INTO [Total Purchase]
FROM Supply LEFT JOIN Amount ON Supply.Supply = Amount.Item
GROUP BY Amount.Item, Amount.Date, Supply.Supply, Supply.Purchaser, Supply.Location;
If you use SELECT INTO the Total Purchase table will be deleted first. Is this what you want to happen every time? To actually append records use INSERT SELECT.