>>
>>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