Ranking problem

bergjes

New member
Local time
Today, 21:29
Joined
May 14, 2010
Messages
2
I know there are many threads about ranking, but I cannot figure out how things work.
I hope somebody can explain how to rank my query (see attachment).
I want to use dense_rank, it has to be ranked each day and order by ranking.

Hope somebody knows what I mean.

Thanks,
Erik
 

Attachments

select
*,
dense_rank() over(order by dag) as _rank
from
punten_dag
 
Hi Pilsdumps.

Thanks for your quick response.

I tried your solution, but I think I'm doing somthing wrong, because it doesn't work.

Here is my code:
SELECT punten_dag.*
DENSE_RANK() OVER(ORDER BY punten_dag.dag) as _rank
FROM punten_dag;

But this code gives a syntax error.

Do I have to use PARTITION BY?
If so, how?

Thanks,
Erik
 
Hi,

My mistake, the solution I gave is for SQL Server rather than Access.
 

Users who are viewing this thread

Back
Top Bottom