Hi Robin,
Let's say you had two tables, agents and property. In property, you have a foreign key pointing to the agent for that property. Now you want all property rows for agents based in London. The foreign key in property is called fk_agent, and called pk in the agent table.
SELECT * FROM property ;
WHERE fk_agent IN (SELECT pk FROM agent WHERE city="London")
See?
>I'm Ok with joins could somebody please
>explain the IN clause in SQL i.e
>
> Select fields from tables ;
> where variable in(select a from b) ;
> into cursor temp
>
>Thanks
>Rob
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05