Two colum will populate in Single colum

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
BMSK
Participant
Posts: 41
Joined: Wed Feb 06, 2008 7:00 am
Location: Bangalore

Two colum will populate in Single colum

Post by BMSK »

Hi My input is like this

con_id con_sus_id
1 10
1 8
2 4
3 6
5 7
9 8

My criteriea
1)All Con_id should be indicated as T and con_sus_id would be indcated as C
2) After 1 its should take 10 and then 1 and 8, and 2 and 4 like.....

this is the my output reqires

COn_id Record_type
1 T
10 C
1 T
8 C
2 T
4 C
3 T
6 C
5 T
7 C
9 T
8 C

regards
bmsk
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Use a Pivot stage.

Upstream of the Pivot stage use a Column Generator stage to add the constants.

Code: Select all

con_id con_sus_id con_id_K con_sus_id_K
   1       10           T          C
   1        8           T          C
   2        4           T          C
   3        6           T          C
   5        7           T          C
   9        8           T          C
Pivot on con_id,con_sus_id and on con_id_K,con_sus_id_K
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
BMSK
Participant
Posts: 41
Joined: Wed Feb 06, 2008 7:00 am
Location: Bangalore

Post by BMSK »

Thanks ray

Its solved.

regards
bmsk
Post Reply