Converting rows into columns

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
radhika7983
Participant
Posts: 16
Joined: Wed Apr 07, 2010 10:44 pm

Converting rows into columns

Post by radhika7983 »

Hi

we have the following requirement,

sort code accnt no A B C OccuNo
11 22 5 6 8 1
11 22 8 9 0 2
33 44 6 3 2 1

Output should be like


11 22 5 6 8 8 9 0
33 44 6 3 2 '' '' ''

Can some one helpas how to implemnet it without running the transformer in sequentail. Here the most important part is that the first occur should come first and second later in sequence.

Thank you
sureshreddy2009
Participant
Posts: 62
Joined: Sat Mar 07, 2009 4:59 am
Location: Chicago
Contact:

Post by sureshreddy2009 »

Can you please eloborate the problem definition
In the example you specified the output which you need is not clearly mentioned and why without running the transformer in sequentail..?
Suresh Reddy
ETL Developer
Research Operations

"its important to know in which direction we are moving rather than where we are"
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You need to improve your skills at specification.

For example, the first two columns are (or appear to me to be) the pivot keys and you want only the first three non-key columns from each row to be included in a vertical pivot, with missing values replaced by empty string (or do you want null?).

Do I have it correctly understood?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

What if you have OccurNo 3 ? Must that be bundled into the same record ?

In that case, you will have to work out the largest 'Occur'.

This appears more like a CFF.
Post Reply