Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00229451
Message ID:
00229463
Vues:
14
Try this...
select a.*;
  from CodeTable a;
  where a.ddate in;
        ( select max( b.ddate );
            from CodeTable b;
            where b.cparentid = a.cparentid ) 
by using the subquery to qualify only the
maximum date for the current parent ID, only
those records in the outer query with that date
will be accepted in final query...

You may have to adjust this a bit in case there
are more than 1 Code/Cdesc combination with
entries on the same date.

HTH
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform