General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Finding the most recently dated record
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only