F
f2rox
I am using the following SQL statement which i found elsewhere on this site):
This makes a query that looks like this:
NAME GRADE
Student 1 70
Student 1 78
Student 1 80
Student 1 65
Student 2 81
Student 2 85
Student 2 80
etc., etc.
My problem with this is that if a student has the same grade twice, it will
only be listed once. Is there any way to modify this so that each grade is
listed, even if the student has more than one of the same grade?
SELECT NAME, Grade1 AS GRADE FROM tblStudentGrades
UNION
SELECT NAME, Grade2 AS GRADE FROM tblStudentGrades
UNION
SELECT NAME, Grade3 AS GRADE FROM tblStudentGrades
UNION
SELECT NAME, Grade4 AS GRADE FROM tblStudentGrades;
This makes a query that looks like this:
NAME GRADE
Student 1 70
Student 1 78
Student 1 80
Student 1 65
Student 2 81
Student 2 85
Student 2 80
etc., etc.
My problem with this is that if a student has the same grade twice, it will
only be listed once. Is there any way to modify this so that each grade is
listed, even if the student has more than one of the same grade?