Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Problem
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00229451
Message ID:
00229463
Views:
13
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
Previous
Reply
Map
View

Click here to load this message in the networking platform