Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
One select statement for a many to one relationship
Message
De
21/03/2007 17:39:44
 
 
À
21/03/2007 16:36:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01206773
Message ID:
01206828
Vues:
17
Dang it.

Now who do I give the 3 stars to? and who gets the 1 star? rofl
They are both what I needed.

Thank you both, Naomi and Rich.

>>Hi All,
>>
>>We have a table that holds all of our addresses (address_id), we have an other table that holds 3 references for that address table, the main address, the early address and the late address (address_id, am_address_id, and pm_address_id)
>>
>>We need to get all the addresses stored in the people table (address_id, am_address_id, and pm_address_id) with the full address info.
>>
>>We need it to be ANSI complinat because this could go to a SQL back-end, and VFP back-end or and other db back-end.
>>
>>Can this be done?
>>
>>Thanks,
>>Beth
>
>Would something like
>SELECT people.*,ad.*,am.*,pm.* ;
>  FROM people ;
>  LEFT OUTER JOIN address ON people.address_id = address.addres_id;
>  LEFT OUTER JOIN address am ON people.am_address_id = am.address_id;
>  LEFT OUTER JOIN address pm ON people.pm_address_id = pm.address_id
>do the trick?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform