>I have a table that joins providers, services and counties (what services in which county are given by a provider). The table has multiple entries per provider and has foreign keys for the provider, service and county. I need to populate a combo box with the services that a selected provider provides in ALL counties (which the provider is in). In other words, which services are common to every county for the provider.
>
>Does anyone have any ideas?
I am going to call your join table TableX. Does the following work for you?
select services.descript, county.county_name, services.Keyid ;
from services ;
join TableX ;
on services.keyid = TableX.Services_ID
join Counties ;
on Tablex.County_ID = County.KeyID ;
where TableX.Provider_ID = ?nProvider_ID ;
order by ...
If not, some sample data from all 4 tables would be helpful.
Mark McCasland
Midlothian, TX USA