Robert Rosenbsuch
asked on
Return Max Date
Ok below is my current SQL statement for a query in AccessDB I am trying to find a way to add a find max date (or most recent date) from the TxnDate column and only return results with the most recent TxnDate. Any help is greatly appreciated. Thanka
SELECT Customer.FullName, Customer.Email, Customer.Phone, ReceivePayment.TxnDate, ReceivePayment.TotalAmount , Customer.TotalBalance, Customer.CustomFieldDepart ment
FROM Customer INNER JOIN ReceivePayment ON Customer.ListID = ReceivePayment.CustomerRef ListID
GROUP BY Customer.FullName, Customer.Email, Customer.Phone, ReceivePayment.TxnDate, ReceivePayment.TotalAmount , Customer.TotalBalance, Customer.CustomFieldDepart ment, Customer.IsActive
HAVING (((Customer.TotalBalance)> 30) AND ((Customer.IsActive)=Yes))
ORDER BY Customer.FullName;
SELECT Customer.FullName, Customer.Email, Customer.Phone, ReceivePayment.TxnDate, ReceivePayment.TotalAmount
FROM Customer INNER JOIN ReceivePayment ON Customer.ListID = ReceivePayment.CustomerRef
GROUP BY Customer.FullName, Customer.Email, Customer.Phone, ReceivePayment.TxnDate, ReceivePayment.TotalAmount
HAVING (((Customer.TotalBalance)>
ORDER BY Customer.FullName;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.