Select top x rows (ingoring ties)
Posted on 2006-07-20
I have a db of league scores for a golf club. I want to return a player's top 5 scores.
When I do a SELECT TOP 5 SCORES FROM SCORES query, if the fifth row is a tie, I get more than 5 rows back. To illustrate, say the scores are as follows:
I will get 7 rows back, because of the ties.
That's no good for my purposes! I want the top 5 ONLY. Does anyone know a way I can do this? I really want to do it in the query, but if I must resort to VBA then so be it.