Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Always trips me up!
Message
 
 
À
14/06/2007 13:21:41
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01233129
Message ID:
01233136
Vues:
18
Try
SELECT * FROM Members mb
  JOIN StatusHistory sh ON sh.MemberId = mb.MemberId
  WHERE sh.ChangeDate = (SELECT MAX(ChangeDate) FROM StatusHistory WHERE MemberId = sh.MemberId)
>
>This kind of query should be common yet I often seem to break it.
>
>Two tables
>
>Members, StatusHistory.
>
>Status history has the member id the status and the date of the change.
>
>I want to grab member info and the current status and change date as of this moment for each member.
>
>Please help.
>
>Thanks!
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform