Selecting the most recent status for an order

  • Thread starter Thread starter Lori
  • Start date Start date
L

Lori

Will someone tell me how to select the most recent record
from a table where the table contains multiple rows for
the same entity but each row contains the latest status
for that record. I do have a date field for each status
update row. For example, for all "orders" in the table, I
want to pull only the most recent status field for each
order. (e.g. for all oranges, I want the latest shipping
status and for all apples I want the latest shipping
status) I have tried using date criteria, but I cannot
specify what is the earliest status date and I cannot
specify what is the most recent status date. Any help
would be appreciated. Thanks!
 
Create a query and add the date field and the orderID. Select the summation
sign on the query tool bar to create a totals query. Group by the OrderID
and set the date grouping to be the MAX value.
 
Back
Top