|
| |
|
|
DesiMcK
Posts: 445 Joined: 4/26/2004 From: Essex, UK Status: offline
|
Help with SQL code - 4/6/2008 15:40:32
Hi, here is my problem. I have a table with four fields: ID, PupilID, Task, Mark the table has values like this: 1 | Pupil1 | Task1 | Mark 2 | Pupil2 | Task1 | Mark 3 | Pupil3 | Task1 | Mark etc 11 | Pupil1 | Task2 | Mark 12 | Pupil2 | Task2 | Mark 13 | Pupil3 | Task2 | Mark etc and so on. What I would like is a table that list the pupils done the left and the tasks across the top with the corresponding marks lined up. _______ Task1 Task2 Task3 etc Pupil1 Pupil2 Pupil3 Is this possible with asp? Thanks, Desi
|
|
|
|
DesiMcK
Posts: 445 Joined: 4/26/2004 From: Essex, UK Status: offline
|
RE: Help with SQL code - 4/7/2008 17:31:08
This is the SQL code that works in Access: TRANSFORM Avg(tblHomework.Mark) AS AvgOfMark SELECT tblPupil.PupilID FROM tblHomework INNER JOIN tblPupil ON tblHomework.PupilID = tblPupil.PupilID GROUP BY tblPupil.PupilID, tblPupil.FirstName, tblPupil.Surname, tblHomework.ClassID, tblHomework.Task, tblHomework.DateSet, tblHomework.DateDue PIVOT tblHomework.TaskID How can I use it in an asp page. I am unsure how to set up the table. Thanks for all your time and help. Desi
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|