Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finding the most recently dated record
Message
De
17/09/2000 09:07:42
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
 
 
À
17/09/2000 05:07:47
Jill Derickson
Software Specialties
Saipan, CNMI
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00417373
Message ID:
00417398
Vues:
20
Jill,

When I need to get to the latest appointment for a patient I use the following for my index:

STRING(PatientId) + DTOS(VisitDate) DESCENDING

The records come out like:
 PatientId   VisitDate
         3   {01/03/2000}
         3   {01/02/2000}       
         3   {01/01/2000}       
         2   {01/03/2000}       
         2   {01/01/2000}
If I'm selecting data for a report I can order by PatientId ASCENDING and VisitDate DESCENDING since the above isn't nice for a report.


>Bill,
>
>Thanks...yes that was a way I've done it previously...guess I was thinking there must be a more elegant way, but, oh well. Thanks again.
>
>J
>
>>I think that you will get the CaseAAGsID for the lowest record in the table for each CourtCasesID. (Not the CaseAAGsID for the max(date) record) You can do this with two steps.
>
>>Not too elegant but it works!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform