Long story short, I would like to take the results from the top part of the picture, and have them show up as the bottom does. The TestName
field has 1300+ options, so I'm guessing a subquery for pulling the TestName
and then creating a column based off of it would be best. This is for a Microsoft SQL Database.
Orginal Table:
+-----------------+--------------+------------------+
| AccessionNumber | TestName | Result |
+-----------------+--------------+------------------+
| K09035053 | Organism | Rhodococcus equi |
| K09035053 | Timentin | Susceptible |
| K09035053 | Erythromycin | Susceptible |
| K09035053 | Sulfa-Drugs | Resistant |
+-----------------+--------------+------------------+
Fixed Table:
+-----------------+------------------+-------------+--------------+-------------+
| AccessionNumber | Organism | Timentin | Erythromycin | Sulfa-Drugs |
+-----------------+------------------+-------------+--------------+-------------+
| K09035053 | Rhodococcus equi | Susceptible | Susceptible | Resistant |
+-----------------+------------------+-------------+--------------+-------------+