last date query problem

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?
 
M

Michel Walsh

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
 

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