last date query problem

  • Thread starter Thread starter Luigi
  • Start date Start date
L

Luigi

Stumped by this one: I'm looking at a table with (roughly) the
following structure:

case_id; activity_date; activity_desc; seq_no

I'm trying to get the last activity date (using Max or Last) which is
straightforward enough - returns 1 date for each case. However when I
pull in the activity desc I get multiple records. Can't see a way
round this - any suggestions?
 
Hi,


Take a look at http://www.mvps.org/access/queries/qry0020.htm Do not
use LAST in this case, LAST does not mean LATEST. LAST means the last record
seen by the database engine, for each group, while executing the query plan,
and thus, is dependant of the query plan selected by the database engine...
that makes it, basically, more like a value taken from a random record
belonging to the group, than the latest record (entered in the table).




Hoping it may help,
Vanderghast, Access MVP
 
Back
Top