How to generate Row number in Access?

  • Thread starter Thread starter Sadiq
  • Start date Start date
S

Sadiq

I have a student Table with StudentName and Marks
I want a query which will display the student details with Rank Based on
Marks
 
A rank is not a 'row number' since a rank can be derived from the data.


SELECT a.studentName, a.mark, COUNT(*)
FROM tableName AS a INNER JOIN tableName AS b
ON a.mark > b.mark OR (a.mark = b.mark AND a.studentName >=
b.studentName)
ORDER BY a.studentName, a.mark



in sql view. Change tableName (twice) for the real table name.



Vanderghast, Access MVP
 
Back
Top