Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
V6s5 - SQL for Parent and only the Latest Child rec
Message
 
To
23/03/2004 05:01:03
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00888750
Message ID:
00890248
Views:
28
Hi Cetin and Dorin

Thanks both of you. Here is the final code from your suggestions
SELECT tNonCummu.*, sNonCummu.*
    FROM tNonCummu
       JOIN sNonCummu ON tNonCummu.iID = sNonCummu.iPID
    WHERE sNonCummu.dDueDt =
       (SELECT MAX(sNC.dDueDt)
          FROM tNonCummu tNC
             JOIN sNonCummu sNC ON tNC.iID = sNC.iPID
          GROUP BY sNC.iPID)
We have to group or else only one is shown.
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform