Query problem look for code for last modified

L

Lucille

How would I put a criteria to filter out the last modified
date for each product in the database. What would be the
statement that I use.
 
J

John Spencer (MVP)

A guess since you didn't supply any fields or your query. And I'm not sure that
the below answers your question.

Do you want to return the last (most recent) modified date for each product or
do you want to return all the records for each product EXCEPT the one with the
last modified date.

SELECT <your list of fields>
FROM YourTable
WHERE ModifiedDate =
(SELECT MAX(Tmp.ModifiedDate)
FROM YourTable as Tmp
WHERE Tmp.Product = YourTable.Product)
 

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