Finding rank of the student -Sql Compact

Posted by Jankhana on Stack Overflow See other posts from Stack Overflow or by Jankhana
Published on 2010-05-22T05:41:24Z Indexed on 2010/05/22 5:50 UTC
Read the original article Hit count: 219

Filed under:

I have a table like this :

Name Mar1 Mar2 Mar3 Total

xxx 80 80 80 240

yyy 60 70 50 180

aaa 85 65 75 225

I wanted to find the rank of the student based on total. I using SQL Compact 3.5 . As we have rank() function in sql server do we have something with which we can find the students rank??? When I used "select Total,rank() over (order by total desc) i1 from stmarks " it's giving error as

" Major Error 0x80040E14, Minor Error 25501

select Total,rank() over (order by total desc) i1 from stmarks There was an error parsing the query. [ Token line number = 1,Token line offset = 21,Token in error = over ] "

Do Sql Compact support rank() over or is there any another way???

© Stack Overflow or respective owner

Related posts about sql-compact-edition