Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Quantity of data transferred with a select
Message
From
13/05/2008 07:03:46
 
 
To
13/05/2008 06:54:17
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01316587
Message ID:
01316600
Views:
10
>>
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform