Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting DISTINCT
Message
From
05/10/2000 10:21:28
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Selecting DISTINCT
Miscellaneous
Thread ID:
00425306
Message ID:
00425306
Views:
45
I’m trying to SELECT DISTINCT on two fields on a huge view. (as shown in subquery)
When I run a DISTINCT by itself in those two fields it may take some 10 min to run but when I try this SELECT below it takes forever. Even worst, I am not sure it will bring what I want. What I need is to bring ALL the fields on my DISTINCT. Am I doing this right?

SELECT *
FROM view1
WHERE Acc_field IN
(SELECT DISTINCT Acc_field FROM view1 WHERE year = '2001'
AND Acc_field LIKE '5%')
Next
Reply
Map
View

Click here to load this message in the networking platform