Convert Row's to Columns and Columns to Rows

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
suri
Participant
Posts: 24
Joined: Tue May 25, 2004 12:17 am
Location: piscataway
Contact:

Convert Row's to Columns and Columns to Rows

Post by suri »

Hi,

I am new to this tool and I need some help.I want convert the Rows to Columns and Columns to Rows, I need to write Routine or is there any other way in Datastage.


Thanks
Suresh
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
Can you give a little example of what you need to do?
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
KeithM
Participant
Posts: 61
Joined: Thu Apr 22, 2004 11:34 am
Contact:

Post by KeithM »

You can use the pivot stage to convert columns to rows. Converting rows to columns is a little harder. There have been numerous posts on that topic in this forum. Do a search on 'vertical pivot'.
rasi
Participant
Posts: 464
Joined: Fri Oct 25, 2002 1:33 am
Location: Australia, Sydney

Post by rasi »

In version 7 you have Row Splitter and Row Merger. The splitter reads one row and splits a string into number of columns. The Row Merger merges all the columns to one single string in specified format.

As Keith said you can use Pivot to convert columns to rows. and Row Splitter to convert rows to columns.

Thanks
Siva
Post Reply