Greetings,
My apologies, for I am still a novice in all of this. I have a small issue happening when I'm creating a query though MS Query.
Is it possible to have the PaymentDate as criteria, but NOT have it grouped by? When it uses PaymentDate, it splits up the PaymentAmounts into each paymentdate, but the paymentdate isn't even being shown on the query. Im trying to sum the PaymentAmount and only group it by PurchaseDate.
Wes
My apologies, for I am still a novice in all of this. I have a small issue happening when I'm creating a query though MS Query.
Code:
SELECT Accounts.PurchaseDate, Sum(MasterPayments.PaymentAmount) AS 'Sum of PaymentAmount', Ownership.OwnerName
FROM E.dbo.Accounts Accounts, E.dbo.MasterPayments MasterPayments, E.dbo.Ownership Ownership
WHERE Accounts.OwnershipID = Ownership.OwnershipID AND Accounts.AccountID = MasterPayments.Account
GROUP BY Accounts.PurchaseDate, Ownership.OwnerName, MasterPayments.PaymentDate
HAVING (Accounts.PurchaseDate>{ts '2009-01-01 00:00:00'}) AND (MasterPayments.PaymentDate<=getdate())
ORDER BY Accounts.PurchaseDate
Wes
Last edited: