Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bill of Materials etc.
Message
From
17/03/2000 10:00:28
Michael Dougherty
Progressive Business Publications
Malvern, Pennsylvania, United States
 
 
To
16/03/2000 12:49:02
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00346498
Message ID:
00347013
Views:
44
>Parent-Child
>3-4
>2-5
>2-6
>2-7

i'm assuming these are the primary key values, and that the child has a foreign key to link to the parent.
select Distinct child.PK, parent.PK ;
       FROM parent join child on parent.PK==child.FK ;
       ORDER by child.PK
the fields will be physically backwards from what you wanted in the output due to the way SQL uses the distinct clause, but field order isn't really important - especially if you're using this Select as the basis for a view (which will likely be interfaced with a grid)
Previous
Reply
Map
View

Click here to load this message in the networking platform