need logic in splitting the record and generate 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
austin_316
Participant
Posts: 80
Joined: Fri Aug 21, 2009 7:49 am
Location: India

need logic in splitting the record and generate columns

Post by austin_316 »

Hi,
we have the requirement of splitting the value of a column and generate columns dynamically based on the delimiter present in the value.

For example:

I have a columns reference_columns in table T1.
The column will have the value as COL1||COL2:COL3||COL4

the delimiter here is : . so we want to generate two columns dynamically usgin sql query or transformer(preferable select query).
The columns generated through select query should be like
Ref1 Ref2
COL1||COL2 COL3||COL4

anyone please help me in this

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

Post by ray.wurlod »

What's the source database? Display functions differ between databases.

In a Transformer stage in DataStage it's easy - just use Field() functions specifying ":" as the delimiter character.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply