Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
I have a table, which I can load throught standard load, that looks like
| Name | Subname | Value |
+-------+---------+-------+
| Name1 | Sname1 | A |
+-------+---------+-------+
| Name1 | Sname2 | B |
+-------+---------+-------+
| Name2 | Sname1 | C |
+-------+---------+-------+
| Name2 | Sname2 | D |
+-------+---------+-------+
| Name2 | Sname3 | E |
+-------+---------+-------+
| Name3 | Sname1 | F |
+-------+---------+-------+
I would like to transform this table so that the Subname is used as a header, i.e. I would like to recieve
| | Sname1 | Sname2 | Sname3 |
|-----------|------------|-------------|------------|
| Name1 | A | B | C |
| Name2 | D | E | |
| Name3 | G | | |
I have tried just loading the data and then using pivot tabel, but I have had no such luck.
Any suggestions?
try using a generic load:
table1:
Generic
LOAD * INLINE [
Name | Subname | Value
Name1 | Sname1 | A
Name1 | Sname2 | B
Name2 | Sname1 | C
Name2 | Sname2 | D
Name2 | Sname3 | E
Name3 | Sname1 | F
](delimiter is '|');
try using a generic load:
table1:
Generic
LOAD * INLINE [
Name | Subname | Value
Name1 | Sname1 | A
Name1 | Sname2 | B
Name2 | Sname1 | C
Name2 | Sname2 | D
Name2 | Sname3 | E
Name3 | Sname1 | F
](delimiter is '|');