Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
One select statement for a many to one relationship
Message
From
21/03/2007 17:39:44
 
 
To
21/03/2007 16:36:58
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01206773
Message ID:
01206828
Views:
18
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?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform