[AccessD] Query giving different results each time

Scott Marcus marcus at tsstech.com
Wed Jul 28 10:34:41 CDT 2004


Ok. I'll be more careful...

SELECT tblTest.bo_id,
       Last(tblTest.pro_cm_seq) AS SEQ,
       Last(tblTest.Phone) AS PHONE_NUMBER,
       Last(tblTest.effdt) AS EFFECTIVE_DATE
FROM tblTest
GROUP BY tblTest.bo_id, tblTest.Primary
HAVING (((tblTest.Primary)=True))
ORDER BY tblTest.bo_id, Last(tblTest.effdt);

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of O'Connor,
Patricia (OTDA)
Sent: Wednesday, July 28, 2004 11:29 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Query giving different results each time


Be Careful using LAST it will not always give you what you expect. It
will give you the last one it encounters which may not be the MAX date
!!!

See help files and knowledge base

Patti 




More information about the AccessD mailing list