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: