Selecting the most recent status for an order

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!
 
S

SA

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top