Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning sets of records from a table with limited crit
Message
From
12/01/2004 18:37:12
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00866172
Message ID:
00866199
Views:
25
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')
>>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform