G
Guest
I have the following query
SELECT tblLoanData.LoanID, Max(tblPayments.Date) AS LastPaymen
FROM tblLoanData LEFT JOIN tblPayments ON tblLoanData.LoanID = tblPayments.LoanI
GROUP BY tblLoanData.LoanID, tblLoanData.Deleted, tblPayments.Deleted, tblPayments.Typ
HAVING (((tblLoanData.Deleted)=False) AND ((tblPayments.Deleted)=False) AND ((tblPayments.Type)='Full/Partial Payment')
So I want the LoanID and last payment date (loan is not deleted, payment is not deleted
This works fine unless there is no payment for a particular loan. How do I rework the query to give me a null value for last payment if there is no payment record
Thanks in advance!
SELECT tblLoanData.LoanID, Max(tblPayments.Date) AS LastPaymen
FROM tblLoanData LEFT JOIN tblPayments ON tblLoanData.LoanID = tblPayments.LoanI
GROUP BY tblLoanData.LoanID, tblLoanData.Deleted, tblPayments.Deleted, tblPayments.Typ
HAVING (((tblLoanData.Deleted)=False) AND ((tblPayments.Deleted)=False) AND ((tblPayments.Type)='Full/Partial Payment')
So I want the LoanID and last payment date (loan is not deleted, payment is not deleted
This works fine unless there is no payment for a particular loan. How do I rework the query to give me a null value for last payment if there is no payment record
Thanks in advance!