Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Maximum record of child in one-to-many relationship
Message
 
 
À
21/02/2000 22:01:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00335165
Message ID:
00335212
Vues:
16
Try something like the following:
select main.*,max(weeks.field1) as maxweeks ;
   from main inner join weeks on weeks.main_fk = main.pk ;
   group by main.employee_last_name ;
   order by employee_last_name
This will create records with duplicate entries for the Main data associated with the Weeks data. VFP will then calculate the MAX() leaving only 1 record per employee in the result set.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform