Query problem look for code for last modified

  • Thread starter Thread starter Lucille
  • Start date Start date
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.
 
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)
 
Back
Top