clear markdown compare help donate or buy diddy dollings comments/suggestions/bugs a leap of faith? bible365
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 709971 fiddles created (14193 in the last week).

CREATE TABLE T5 (idnum NUMBER,f1 NUMBER(10,5),f2 NUMBER(10,5),f3 NUMBER(10,5),e1 NUMBER(10,5),e2 NUMBER(10,5),h1 NUMBER(10,5),h2 NUMBER(10,5));
 hidden batch(es)


INSERT INTO T5 (IDNUM,F1,F2,F3,E1,E2,H1,H2) VALUES (1,'10.2004','5.009','7.330','9.008','8.003','.99383','1.43243');
1 rows affected
 hidden batch(es)


INSERT INTO T5 (IDNUM,F1,F2,F3,E1,E2,H1,H2) VALUES (2,'4.2004','6.009','9.330','4.7008','4.60333','1.993','3.3243');
1 rows affected
 hidden batch(es)


INSERT INTO T5 (IDNUM,F1,F2,F3,E1,E2,H1,H2) VALUES (3,'10.2040','52.6009','67.330','9.5008','8.003','.99383','1.43243');
1 rows affected
 hidden batch(es)


INSERT INTO T5 (IDNUM,F1,F2,F3,E1,E2,H1,H2) VALUES (4,'9.20704','45.009','17.330','29.008','5.003','3.9583','1.243');
1 rows affected
 hidden batch(es)


CREATE TABLE T5_unpiv(IDNUM NUMBER, SK NUMBER, F NUMBER, E NUMBER, H NUMBER, F_COL_NAME VARCHAR2(100));
 hidden batch(es)


INSERT ALL INTO T5_unpiv(IDNUM, SK, F, E,H, F_COL_NAME) VALUES (idnum,1,f1,e1,h1,'F1') INTO T5_unpiv(IDNUM, SK, F, E,H, F_COL_NAME) VALUES (idnum,2,f2,e2,h2,'F2') INTO T5_unpiv(IDNUM, SK, F, E,H, F_COL_NAME) VALUES (idnum,3,f3,NULL,NULL,'F3') SELECT * FROM T5;
12 rows affected
 hidden batch(es)


SELECT * FROM T5_unpiv ORDER BY IDNUM, sk;
IDNUM SK F E H F_COL_NAME
1 1 10.2004 9.008 .99383 F1
1 2 5.009 8.003 1.43243 F2
1 3 7.33 F3
2 1 4.2004 4.7008 1.993 F1
2 2 6.009 4.60333 3.3243 F2
2 3 9.33 F3
3 1 10.204 9.5008 .99383 F1
3 2 52.6009 8.003 1.43243 F2
3 3 67.33 F3
4 1 9.20704 29.008 3.9583 F1
4 2 45.009 5.003 1.243 F2
4 3 17.33 F3
 hidden batch(es)