Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with a code
Message
 
À
28/05/2007 12:49:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01223049
Message ID:
01229075
Vues:
21
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform