Can you limit TopValue function when values are equal?

C

confused

I am using TopValue Function in a Query. I want to only select the top 3
scores in the group. When the 3 and 4th number are equal, access selects 4
numbers or as many as are equal. Can I limit the function to just select top
3 regardless of equal values? For example: Top Values are 120, 100, 90, 90,
80, 70. TopValue 3 will return 120, 90, 90, 80, 80
 
A

Allen Browne

You have to give Access some way to decide which one of the equal values you
want.

A simple solution is to add the primary key field to the end of the ORDER BY
clause. Since the key is unique on each row, Access can then differentiate
between the equal values.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top