Query All records except latest

  • Thread starter Thread starter deb
  • Start date Start date
D

deb

Access 2003

I need to limit my query to ALL RECORDS EXCEPT the most current record.

Any ideas on how to do this
 
Deb -

It will look something like this, assuming no more than one record per date
per key field. You can adjust to use date/time if that is needed. It
depends on what makes your records unique. Try something like this,
substituting your table and fieldnames...

Select myKeyfield, field1, field2, field3, myDate
FROM myTable
Where myDate < (Select max(myDate) from myTable AS T2 WHERE T2.myKeyfield =
myTable.myKeyfield)
 
Access 2003

I need to limit my query to ALL RECORDS EXCEPT the most current record.

Any ideas on how to do this

Access does not know or care which is "the most current" record. You'll have
to define the criteria for that yourself, based on the structure of the table
and the nature of the data. Do you have a sequential ID, or a date/time stamp,
or something else which would let you identify the "current" record?
 
Back
Top