I am having some difficulty trying to achieve some data in MSSQL. Here what I have:
SO_ID | SO_DATE | WAGE_A | WAGE_B | WAGE_B_DUR |
1 | 12/12/06| 100 | 200 | 15 |
2 | 10/10/06| 150 | 250 | 10 |
What I want :
SO_ID | SO_DATE | WAGE_TYPE | AMOUNT | DURATION |
1 | 12/12/06| WAGE_A | 100 | NULL |
1 | 12/12/06| WAGE_B | 200 | 15 |
2 | 10/10/06| WAGE_B | 250 | 10 |
2 | 10/10/06| WAGE_A | 150 | NULL |
I really appreciate it if you could give me some help or advice (including change the first table).
Try as: