Here’s my dilemma. I’m working on a database that will take a student’s answer sheet, put in table [Answers] and compare it to an answer key in table [Tests]. Also, associated with each question is a specific education standard.
I get an excel export from our testing website for the answer sheets. It’s setup as follows:
| Student ID | Student | Ans 1 | Ans 2 | Ans 3 | etc... |
So [Answers] is setup to be a simple direct import from Excel.
The end result wanted is a counted list of standards that the student missed. I.E.:
| Name | Standard | Count |
| John Doe | ABC1234 | 8 |
I’m at a loss on how to get to that point. I can get the standards missed, but then I can’t count horizontally.
Any help would be greatly appreciated. Thanks.
You are going to need to unpivot the data from the table using a
UNION ALLquery:Once the data is in one column, then you will be able to apply
count()