Originally Posted by
printsol
Thank you very much for you help and guidance , i will try to change data structure as per your recommendation , One more thing please let me know how can we dense rank?
for tie duplicate values it might be 1,2,3,3,4,5,6
any guidance
thanks a lot
Not quite sure what you mean.
To clarify, the first query sorts the students in descending mark order - highest mark at the top
The second query uses that to give a rank order value depending on which field is used in the Serialize expression
The example I sent you gives equal rank values where the GTotal marks are the same - e.g. three values where Rank =21 in screenshot from post #8
That is because the query SQL I used was:
Code:
SELECT GetClassDataFrmTable.RollNo, GetClassDataFrmTable.StudentName, GetClassDataFrmTable.Class,
GetClassDataFrmTable.Section, GetClassDataFrmTable.Gender, GetClassDataFrmTable.Gtotal, Serialize("GetClassDataFrmTable","Gtotal",[Gtotal]) AS MarkRank
FROM GetClassDataFrmTable
ORDER BY Serialize("GetClassDataFrmTable","Gtotal",[Gtotal]);
If you don't want rank order ties, then base your serialize expression on RollNo instead:
Code:
SELECT GetClassDataFrmTable.RollNo, GetClassDataFrmTable.StudentName, GetClassDataFrmTable.Class,
GetClassDataFrmTable.Section, GetClassDataFrmTable.Gender, GetClassDataFrmTable.Gtotal, Serialize("GetClassDataFrmTable","RollNo",[RollNo]) AS MarkRank
FROM GetClassDataFrmTable
ORDER BY Serialize("GetClassDataFrmTable","RollNo",[RollNo]);
This gives the result:
Please read my website article and look at the examples again as all of that was explained in that article - the link is in post #2