Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I select similar records
Message
 
À
24/10/1996 15:53:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00010792
Message ID:
00010889
Vues:
40
>>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...

i guess it depends on whether or not you want a column in your result to hold the number of like scores...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform