Every year, we receive data about what exams our students will be taking. This comes in a standard format that can't be altered until after we receive it:
Nearly all students take 5 or 6 exams, so nearly all students have 5 or 6 exam numbers spreas throughout any of the 40 fields.
Because almost all students take a set number of exams, it's easy enough to change this into:
Each exam gets three marks - 2 interim and one agreed, so I think what I'd like to do is import the above format into an Access table (n.b. I have simplified the table here based on the problem I'm trying to solve - it has a lot more data we need in other capacities) and then create a new table that looks like this:
The only way I can see to do this (at the moment) is by running 6 separate append queries to take each exam column and append it to the new table, and I'm sure that can't be right. There must be a more efficient way.
Anyone got any ideas?
Cheers
-Jen
Code:
student_id 1 2 3 4 5 6 7 ... 40
1234X 1 3 4 6
2234X 2 4 5 6 7 40
Nearly all students take 5 or 6 exams, so nearly all students have 5 or 6 exam numbers spreas throughout any of the 40 fields.
Because almost all students take a set number of exams, it's easy enough to change this into:
Code:
student_id ex1 ex2 ex3 ex4 ex5 ex6
1234X 1 3 4 6 28a
2234X 2 4 5 6 7 40
Each exam gets three marks - 2 interim and one agreed, so I think what I'd like to do is import the above format into an Access table (n.b. I have simplified the table here based on the problem I'm trying to solve - it has a lot more data we need in other capacities) and then create a new table that looks like this:
Code:
student_id exam mark_1 mark_2 final_mark
1234X 1
1234X 3
...
2234X 2
2234X 4
etc...
The only way I can see to do this (at the moment) is by running 6 separate append queries to take each exam column and append it to the new table, and I'm sure that can't be right. There must be a more efficient way.
Anyone got any ideas?
Cheers
-Jen