Ms Access ranking students
Closed
                    
        
                    TajUrRehman
    
        
                    Posts
            
                
            4
                
                            Registration date
            Monday November 14, 2016
                            Status
            Member
                            Last seen
            November 18, 2016
            
                -
                            Nov 14, 2016 at 03:07 AM
                        
yg_be Posts 24281 Status Contributor - Nov 18, 2016 at 07:43 AM
        yg_be Posts 24281 Status Contributor - Nov 18, 2016 at 07:43 AM
        Related:         
- Ms access rank function
 - Ms access free download - Download - Databases
 - Ms access 64 bit odbc driver - Guide
 - Access and downloading - Guide
 - How to access google usa - Guide
 - How to access bios - Guide
 
4 responses
                        
                            
                    Sample query on table "ranking" containing two fields, "id" and "result" :
            SELECT r1.id, r1.result, 1+Count(r2.id) AS rank FROM ranking AS r1 left join ranking AS r2 on (((r1.result)<[r2].[result])) GROUP BY r1.id, r1.result ORDER BY r1.result DESC;
                
        
                    TajUrRehman
    
        
                    Posts
            
                
            4
                
                            Registration date
            Monday November 14, 2016
                            Status
            Member
                            Last seen
            November 18, 2016
            
                    
Nov 16, 2016 at 02:01 AM
    Nov 16, 2016 at 02:01 AM
                        
                    table is simple i just want to rank only one field name total obtaining marks of students i want to get rank as students position 1st, 2nd, and 3rd like.
the equal obtaining marks should be count one position in serial
thanks for reply me.
            the equal obtaining marks should be count one position in serial
thanks for reply me.
        
    
    
    
    
Nov 16, 2016 at 04:32 PM
This will not work on an excel spreadsheet.
Nov 16, 2016 at 05:25 PM
Nov 16, 2016 at 05:28 PM
Nov 17, 2016 at 12:25 AM
my id field do not have autonumber field i have textfield named admission no as student id. can i know in the mentioned coding for ranking has r1, r2 are these fields or its using only in programming language. (what are these r1, r2)?
Nov 17, 2016 at 12:14 PM
In the text I provided, you have to replace
- "ranking" by the name of your table
- "id" by the name of the column identifying the student, perhaps "[admission no]".
- "result" by the name of the column containing the marks.
By the way, I suggest avoiding spaces in names of tables and of columns.
"r1" and "r2" are just names used inside the SQL query, you can leave them as is.