Converting cols into rows
Posted: Tue Feb 19, 2008 9:01 am
3 cols in the input file:-
depth name
1 A
2 B
3 C1
3 C2
3 C3
2 B1
3 c4
3 c5
1 A1
2 B3
3 C6
3 c7
My condition is that:-
IF depth=1 then its Distributor
IF depth=2 then Its FES
IF depth=3 then Its RETAILER
now output should come like this:-
o/p col:-
distributor FES RETAILER
A B C1
A B C2
A B C3
A B1 C4
A B1 C5
A1 B3 C6
A1 B3 C7
Anyone please help me in solving this issue.....?
there is huge amount of data in the input file and input is simple flat file and o/p is db2
depth name
1 A
2 B
3 C1
3 C2
3 C3
2 B1
3 c4
3 c5
1 A1
2 B3
3 C6
3 c7
My condition is that:-
IF depth=1 then its Distributor
IF depth=2 then Its FES
IF depth=3 then Its RETAILER
now output should come like this:-
o/p col:-
distributor FES RETAILER
A B C1
A B C2
A B C3
A B1 C4
A B1 C5
A1 B3 C6
A1 B3 C7
Anyone please help me in solving this issue.....?
there is huge amount of data in the input file and input is simple flat file and o/p is db2