Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 VB command, Call data from db to find ranking.

views
     
TSMichael83
post Mar 26 2006, 05:48 PM, updated 19y ago

Getting Started
**
Junior Member
160 posts

Joined: Jun 2005
I need urgent help...

My db data in a student table is got name... average... and total mark...

How can I rank those in the same class??
What command and code pls...

Thank you very much.
kimhoong
post Mar 26 2006, 06:05 PM

Look at all my stars!!
Group Icon
Elite
5,154 posts

Joined: Jan 2003


er... what do you mean by ranking them? is it another homework from your lecturer/tutor?
eddomlim
post Mar 26 2006, 06:26 PM

Casual
***
Junior Member
358 posts

Joined: Jan 2005


i think you need a mapping table for ranking
SincerePrayer
post Mar 27 2006, 07:47 PM

love to pray
Group Icon
Elite
1,120 posts

Joined: Jun 2005
Michael83,


I guess you are referring to giving the student rank that are under same class. If you want to do that in VB, that would be quite tricky and messy.

I would suggest you use SQL command to do the grouping. You can refer the following command. (please take note those fields are just my assumption)
SQL
SELECT Class_Name, Student_Name, Total_Mark
FROM Table_AllResults ORDER BY Class_Name, Total_Mark DESC, Student_Name ASC




Hope this can give you some hint and Happy Coding smile.gif
TSMichael83
post Mar 27 2006, 10:43 PM

Getting Started
**
Junior Member
160 posts

Joined: Jun 2005
thanks guys....

 

Change to:
| Lo-Fi Version
0.0114sec    0.26    5 queries    GZIP Disabled
Time is now: 28th March 2024 - 07:21 PM