Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find records with the latest date
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Find records with the latest date
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01155326
Message ID:
01155326
Vues:
65
Hi everybody,

I have the following select
select LT.cTrans_pk, LT.cPatients_fk,  ;
			LT.iBatch_Number, LST.cStage_Trans_pk ;
			from load_trans LT inner join load_stage_trans LST ;
			on LT.cClient_Account_Number = LST.cClient_Account_Number and ;
			LT.cClient_Code = LST.cClient_Code ;
			where LT.cClient_Code = "1201" and LST.tEntered_Date > date() - 7 ;
			into cursor cursor_trans_stage nofilter ;
			order by LT.iBatch_Number
Now I want the same select, but I want to use only records with maximum date from Load_Stage_Trans. In other words, I may have several records in LST, but I want just one of them with the latest date. How can I change my select statement?

Thanks a lot in advance.
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform