I am trying to create a table that has the following structure:
SSN,
ICD9
From a table with the following structure:
SSN,
ICD9_1,
ICD9_2,
...,
ICD9_8
The only way I can see accomplishing this now is by using a massive union statement:
SELECT
DISTINCT SSN, ICD9 FROM (
SELECT SSN, ICD9_1 AS...