Discussion Locked

Access 2000 query question

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have an access query which returns records based on a comparision between record date, expiry date and todays date. If 2 particular fields are duplicated in the results I need the query to return the records with the most recent record date. What function would I need to use to implement this?

3 replies

by john_wills

Use a subquery with grouping and a max function on the record date. The subquery can then get left-joined by ID and date and the two particular fields to the original table in your query. Only the most recent row for each combination of the ID and the two particular fields will be yielded.

This discussion is closed to new replies.