Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find common values in all records
Message
 
 
À
21/02/2001 18:21:08
John Deupree
Long Term Care Authority
Tulsa, Oklahoma, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00478217
Message ID:
00478223
Vues:
19
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform