Requirement like PIVOT
Posted: Thu Apr 09, 2009 1:54 am
Hi,
Currently am trying to do the following:
Have source data as follows:
ID Name FYM Qty Sales
1 A 200901 1 500
2 B 200902 5 1000
3 C 200901 4 150
4 D 200902 2 252
5 E 200903 9 785
6 F 200903 7 451
7 A 200902 4 410
I have to load into target as below:
ID Name 200901Qty 200901Sales 200902Qty 200902Sales 200903Qty Sal
1 A 1 500 4 410
2 B 5 1000
3 C 4 150
4 D 2 252
5 E 9 785
6 F 7 451
i.e the Qty and Sales should come under the specic FY column defined for the ID/Name,
Can you help me out how can i do this in Pivot stage?
Currently am trying to do the following:
Have source data as follows:
ID Name FYM Qty Sales
1 A 200901 1 500
2 B 200902 5 1000
3 C 200901 4 150
4 D 200902 2 252
5 E 200903 9 785
6 F 200903 7 451
7 A 200902 4 410
I have to load into target as below:
ID Name 200901Qty 200901Sales 200902Qty 200902Sales 200903Qty Sal
1 A 1 500 4 410
2 B 5 1000
3 C 4 150
4 D 2 252
5 E 9 785
6 F 7 451
i.e the Qty and Sales should come under the specic FY column defined for the ID/Name,
Can you help me out how can i do this in Pivot stage?