I have a dataset with the following columns: Subject Date1 SBP1 DBP1 Date2 SBP2 DBP2 Date3 SBP3 DBP3 ..... Date30 SBP30 DBP30
=============== =============== =============== ..... ================== and I would like to normalise into the following: Subje Date SBP DBP
---- ---- --- ---
Subj1 Date1 SBP1 DBP1
Subj1 Date2 SBP2 DBP2
Subj1 Date3 SBP3 DBP3
.....
Subj1 Date30 SBP30 DBP30
Subj2 Date1 SBP1 DBP1
Subj2 Date2 SBP2 DBP2
Subj2 Date3 SBP3 DBP3
.....
Subj2 Date30 SBP30 DBP30 I can think of one solution where I Union the dataset 30 times so: select subject, Date1, SBP1, DBP1 from ds union select subject, Date2, SBP2, DBP2 from ds union .... select subject, Date30, SBP30, DBP30 from ds But hopefully there is a better way?
... View more