Which stage(stages) to use

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
forboy
Participant
Posts: 13
Joined: Tue May 04, 2004 12:03 pm

Which stage(stages) to use

Post by forboy »

Hi,

Can any body help me here .

I have the data in the table like below.

Key1 Key2 code(Key3) status

A 1 X IN
A 1 Y IN
A 1 Z OUT
B 2 M IN
B 2 N IN
B 2 O OUT


How can I get the results like below.

col1 col2 col3(all codes seperated by comma) col4(codes where status = IN)

A 1 X,Y,Z X,Y
B 2 M,N,O M,N



what stage( or stages ) should I have to use to accomplish this

Thank You,
Nash
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

Unfortunately there are no stages that can do this directly.
What you are planning is Vertical Pivoting.
You need to build one.
There are many examples discussed, do a search on Vertical Pivot.
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
Post Reply