Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECT TOP 50 behavior
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00021472
Message ID:
00021522
Vues:
37
>>Maybe a 'tiebreaker' field in the order by? The SQL is doing as it should, it doesn't want to arbitrarily choose one name over another...
>
>As I said to Paul, I still don't think it is correct. Just image if I have 65 persons with the same number of messages at rank 49, it will end with 114 persons in the list of top 50. There should be flag to set on or off.
>
>What do you mean by a tiebreaker?

Some other field to break ties. You could order by messages and name, that way you'll get exactly 50 records unless names are identical. Or you could use a date, something less arbitrary. Anything that makes sense so that you can have the SQL order the tied records so that they aren't tied any more. I do that in my ranking queries to get an exact number.
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform