Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get rank value without rank field
Message
 
 
To
15/07/2011 19:02:55
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MySQL
Miscellaneous
Thread ID:
01518322
Message ID:
01518324
Views:
51
>Hi Experts,
>
>Is it possible to obtain one's ranking without the need to maintain a rank field?
>
>For example, if we have a Grades table:
>
>Student GenAve
>Marc 98%
>Steve 89%
>Jeff 90%
>Adrian 92%
>Dennis 80%
>
>I would then like to do a:
>
>
>SELECT Student, GenAve, SomeRankFunction() as Rank FROM Grades ORDER BY Rank
>
>
>I guess the above should be MySQL syntax since my backend is MySQL.
>
>Thanks
>Dennis

Google by 'MySQL ROW_NUMBER()'

I found this http://forums.mysql.com/read.php?97,162926,163937#msg-163937, may be it's not easy in MySQL.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform