Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning sets of records from a table with limited crit
Message
De
12/01/2004 18:37:12
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00866172
Message ID:
00866199
Vues:
24
Holy crap! That took less than 1 second to return the set! Good job Sergey. Thanks!

>May be JOIN will be faster. Try
SELECT mt1.Name, mt1.ID FROM MyTable mt1 ;
>  JOIN MyTable mt2 ON mt1.ID = mt2.Id AND mt2.Name == 'D'
>
>>That was the solution! Unfortunately my table has 500,000+ records and it takes almost 3 minutes to return the set. So, since that is not a viable option I'm just going to have to change the requirements. :-)
>>
>>>Jay,
>>>
>>>This should work for you.
SELECT Name, ID FROM MyTable ;
>>>  WHERE id IN ( SELECT ID FROM MyTable WHERE Name == 'D')
>>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform