Hi I have the following input.
+------+----+----+
| CODE | R1 | R2 |
+------+----+----+
| A | 0 | 1 |
| B | 1 | 1 |
| C | 0 | 0 |
+------+----+----+
I need the output like below.
+------+------+-------+
| CODE | CODE | VALUE |
+------+------+-------+
| A | R1 | 0 |
| A | R2 | 1 |
| B | R1 | 1 |
| B | R2 | 1 |
| C | R1 | 0 |
| C | R2 | 0 |
+------+------+-------+
Please note that the regions such as R1
and R2
, there are many regions in the actual data like R3
,R4
,R5
and so on. For simplicity, I put only R1
and R2
.
Thanks in advance for your help!