find the record before the MAX of a time field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

We have a tble which tracks movement through a series of processes for a
series of people. I can identify the last event by time that happened to
someone, but need to findthe penultimate time anything happened to them. I
want a function like MAX-1. Is there anything?
 
You can do it with a sub-query ...

SELECT Max(TestDate) AS Penultimate
FROM tblTest
WHERE TestDate <(SELECT Max([TestDate]) FROM tblTest);
 

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

Back
Top