>I have 3 tables:
>
>
> Media_Orders
> |-< Campaigns
> |-< Show_Title
>
>
>The problem is that the Campaign Id is not stored on Media_Orders, but
>Show_Title is.
>
>Media_Orders.Show_Title is a foreign key onto Show_Title.Id.
>Show_Title.Campaign is a a foreign key onto Campaign.Id.
>
>I need to pull all campaign records for the Media_Order records.
>
>Anyone?
Unless I'm missing something it looks like a pretty standard three-table join
select *
from Campaigns
inner join Show_Title
on Campain.Id = Show_Title.Campaign_ID
inner join Media_Orders
on Show_Title.ID = Media_Orders.Show_Title
Dan LeClair
www.cyberwombat.comSET RANT ON - The Wombat BlogLife isn’t a morality contest and purity makes a poor shield. - J. Peter MulhernDisclaimer: The comments made here are only my OPINIONS on various aspects of VFP, SQL Server, VS.NET, systems development, or life in general, and my OPINIONS should not be construed to be the authoritative word on any subject. No warranties or degrees of veracity are expressed or implied. Void where prohibited. Side effects may included dizziness, spontaneous combustion, or unexplainable cravings for dark beer. Wash with like colors only, serve immediately for best flavor.