J
Johanna Gronlund
Can anyone help? I have a table with the following columns: ID, Diagnosis1,
Diagnosis2, Diagnosis3, Factor1, Factor2 and Factor3.
What I would need to have is a table with 3 rows for each ID and only two
other columns: Diagnosis and Factor. Like this:
ID Diagnosis Factor
ID1, Diagnosis1, Factor1
ID1, Diagnosis2, Factor2
ID1, Diagnosis3, Factor3
ID2, Diagnosis1, Factor1
ID2, Diagnosis2, Factor2
ID2, Diagnosis3, Factor3
etc.
I have got as far as creating a table with 3 fields for each ID so that all
3 diagnosis and factors can be appended to it. Is there a way to lookup
against the Diagnosis1 in my original table and to append it in my new table
for those rows that say Diagnosis1?
The reason why I need the information laid in rows rather than columns is
that I need to have the maximum factor for each patient rather than diagnosis
(hence I need all factors in the same column).
Many thanks in advance,
Johanna
Diagnosis2, Diagnosis3, Factor1, Factor2 and Factor3.
What I would need to have is a table with 3 rows for each ID and only two
other columns: Diagnosis and Factor. Like this:
ID Diagnosis Factor
ID1, Diagnosis1, Factor1
ID1, Diagnosis2, Factor2
ID1, Diagnosis3, Factor3
ID2, Diagnosis1, Factor1
ID2, Diagnosis2, Factor2
ID2, Diagnosis3, Factor3
etc.
I have got as far as creating a table with 3 fields for each ID so that all
3 diagnosis and factors can be appended to it. Is there a way to lookup
against the Diagnosis1 in my original table and to append it in my new table
for those rows that say Diagnosis1?
The reason why I need the information laid in rows rather than columns is
that I need to have the maximum factor for each patient rather than diagnosis
(hence I need all factors in the same column).
Many thanks in advance,
Johanna