Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECT
Message
 
To
11/05/1998 17:07:25
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Re: SELECT
Miscellaneous
Thread ID:
00098584
Message ID:
00098589
Views:
28
This may not be the most efficient way to do it, but it should work:

Select Tenants.name From Buildings Where Tenants.bldg_id IN ;
(Select Buildings.bldg_id From Buildings Where Buildings.agent_id = ?lcAgent_id)

lcAgent_id is a memory variable you assign the agent_id you want before you run this query.

HTH

>Sorry, my last message did'nt format properly. My data resides in the following 3 tables with these links:
>
>Agents contains: name, agent_id
>Buildings contains: name, agent_id, bldg_id
>Tenants contains: name, bldg_id
>
>Agents and Buildings are linked by agent_id
>Buildings and Tenants are linked by bldg_id
>Agents and Tenants don't have a common field.
>
>How can I SELECT all the tenants of a particular agent? Will I have to add the agent_id to the tenant table?
>
>Thanks in advance!
_________________________________
There are 2 types of people in the world:
    Those who need closure
Previous
Reply
Map
View

Click here to load this message in the networking platform