Hi,
I have a query returning 3 fields :-
Num - MaxEndDate - EndType
0001 - 01/03/12 - E
0001 - 23/02/12 - N
etc
etc
How can I change my SQL below to ensure that only the the record with the highest date is returned per "Num"
Thanks in advance.
I have a query returning 3 fields :-
Num - MaxEndDate - EndType
0001 - 01/03/12 - E
0001 - 23/02/12 - N
etc
etc
How can I change my SQL below to ensure that only the the record with the highest date is returned per "Num"
Code:
SELECT tblInvoice.InvNo, Max(tblInvoice.EndDate) AS MaxOfEndDate, tblInvoice.EndType
FROM tblInvoice
GROUP BY tblInvoice.InvNo, tblInvoice.EndType;
Thanks in advance.