Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Quantity of data transferred with a select
Message
De
13/05/2008 07:03:46
 
 
À
13/05/2008 06:54:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01316587
Message ID:
01316600
Vues:
11
>>
>>select distinct SUPPL_FK ;
>>       from ITEMS
>>
>
>Hi Gregory,
>I've flipped the select using your idea.. the select is lighting fast now! :)
>Thank you.
>
>
>select SUPPL_PK,SUPPL_NME from SUPPLIERS where SUPPL_PK in ;
>	(select DISTINCT SUPPL_FK FROM ITEMS) ORDER BY SUPPL_NME
>
____
You're welcome

You were doing: for each supplier, look at all corresponding orders

The select distinct first takes all the (distinct) suppliers from orders, then joins them with supplier
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform