K
KevinE via AccessMonster.com
I would like to write a query to find the last (most recent date) records
only from two different fields. No problems using MAX in the ‘Date’ field,
the problem being with the ‘Player’ field. I’ve tried using LAST but it seems
to throw up incorrect results.
thanks,
Kevin
SELECT tblMain.Team, Last(tblMain.Player) AS LastOfPlayer, Max(tblMain.Date)
AS MaxOfDate
FROM tblMain RIGHT JOIN tblCurrent ON tblMain.Team = tblCurrent.Team
GROUP BY tblMain.Team, tblCurrent.ID
ORDER BY tblCurrent.ID;
only from two different fields. No problems using MAX in the ‘Date’ field,
the problem being with the ‘Player’ field. I’ve tried using LAST but it seems
to throw up incorrect results.
thanks,
Kevin
SELECT tblMain.Team, Last(tblMain.Player) AS LastOfPlayer, Max(tblMain.Date)
AS MaxOfDate
FROM tblMain RIGHT JOIN tblCurrent ON tblMain.Team = tblCurrent.Team
GROUP BY tblMain.Team, tblCurrent.ID
ORDER BY tblCurrent.ID;