Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I select similar records
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00010792
Message ID:
00010886
Views:
33
>Edward's answer was right, but there's a different syntax, which I prefer.
>
>SELECT * ;
> FROM mytable ;
> WHERE score IN (;
> SELECTscore;
> FROM mytable ;
> GROUP BY score ;
> HAVING COUNT(score) > 1)
>
>I believe this will work....

Of course opinions may diverge, but isn't it simpler to use

Select fieldA, Count(fieldA) As TotalRecs ;
From tableA ;
Group By fieldA ;
Having TotalRecs > 1

?

And besides, as my experience tells me, the simpler you SQL statements, the faster they get (although this isn't always true).

Just an opinion...
Alexandre Nobre
Alpha Bytes Computer Corp.

Did you know that there are innocent people dying in East Timor?
It helps if you do...

I suppose you don't need glasses if you're able to read this line

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform