Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Subquery, two key fields
Message
 
 
À
04/04/2007 17:18:54
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01211882
Message ID:
01212257
Vues:
10
In VFP usually queries of that type with JOIN are the fastest. The VFP query optimizer is not documented, so it's always a trial and error to figure out the best query in each case.

>I am assuming that EXISTS will do a separate lookup for each record, and will therefore be slow with large tables. Any comments about this assumption?
>
>>You can use EXISTS query or concatenate fields
>>... where EXISTS (select * from Table2 WHERE KeyField = Table1.KeyField AND KeyField2 = Table1.KeyField2 )
>>
>>... where KeyField1 + KeyField2 in (select KeyField + KeyField2 from Table2)
>>
>>
>>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform