Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding the most recently dated record
Message
From
16/09/2000 23:05:07
Jill Derickson
Software Specialties
Saipan, CNMI
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Finding the most recently dated record
Miscellaneous
Thread ID:
00417373
Message ID:
00417373
Views:
38
I THOUGHT I'd solved this once before, but, for the life of me I can't figure it out.

I have a table, CaseAAGs with the following fields:
CaseAAGsID I (primary key)
CourtCasesID I
AAGCode I
DateAssigned D

I want to retrive the CaseAAGsID and the date assigned for the most recently dated entry for each CourtCasesID.

I've tried:
SELECT CaseAAGsID, MAX(assigned) AS latestdate;
FROM CaseAAGs INTO CURSOR CurrentCourtCaseAAG ;
GROUP BY CourtCasesID

But that gives me the wrong CaseAAGsID.

TIA j
Next
Reply
Map
View

Click here to load this message in the networking platform