Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with a code
Message
 
To
28/05/2007 12:49:52
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01223049
Message ID:
01229075
Views:
28
>Sorry, but can you help with the query. And sorry again for the abuse.

Given the following tables:
Horses
IDN   Name      Gender
1     Silver    Horse
2     Golden    Mare
3     Silverado Horse

Heritage
IDN    Mare     Horse   Child
1       2        1       3
Your selct statement would be something like:
SELECT Horse.Idn AS SireID, Horse.Name AS SireName, Mare.Idn AS MareID, Mare.Name AS MareName, Child.IDN AS ChildID, Child.Name AS ChildName ;
  FROM Heritage ;
  JOIN Horses Horse ON Heritage.Horse = Horse.IDN ;
  JOIN Horses Mare ON Heritage.Mare = Mare.IDN ;
  JOIN Horses Chile ON Heritage.Child = Child.IDN ;
 INTO CURSOR Children
Previous
Reply
Map
View

Click here to load this message in the networking platform