Hi all
I rows something like this A B C D and i want it like
A
B
C
D
iam trying to use a pivot but i am getting the output same as that of the input.
I am not able to see any options in Pivot so that i can change.
It is having just the STAGE,INPUT and OUTPUT.Where can i set the things which will work can anyone help me out.
Thanks in advance
rows to column
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 5
- Joined: Tue Mar 27, 2007 10:56 pm
- Location: Bangalore
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Read the manual for the Pivot stage (pivot.pdf).
You may need to create an artificial pivot key column upstream of the Pivot stage, and discard it afterwards.
You may need to create an artificial pivot key column upstream of the Pivot stage, and discard it afterwards.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Columns to rows, actually. As an alternative, check this post.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 132
- Joined: Wed Mar 01, 2006 11:12 pm
- Location: Pune
Re: rows to column
Try This using stage variable if u r writing a fileshwetha.st wrote:Hi all
I rows something like this A B C D and i want it like
A
B
C
D
iam trying to use a pivot but i am getting the output same as that of the input.
I am not able to see any options in Pivot so that i can change.
It is having just the STAGE,INPUT and OUTPUT.Where can i set the things which will work can anyone help me out.
Thanks in advance
stage Derivation
variable
name
stg1 inputlink (say A B C D)
stg2 char(10)
now outputlink.colname derivation will be
ereplace(stg1," " , stg2)
SMB
Re: rows to column
Have you tested your logic?baglasumit21 wrote:Try This using stage variable if u r writing a fileshwetha.st wrote:Hi all
I rows something like this A B C D and i want it like
A
B
C
D
iam trying to use a pivot but i am getting the output same as that of the input.
I am not able to see any options in Pivot so that i can change.
It is having just the STAGE,INPUT and OUTPUT.Where can i set the things which will work can anyone help me out.
Thanks in advance
stage Derivation
variable
name
stg1 inputlink (say A B C D)
stg2 char(10)
now outputlink.colname derivation will be
ereplace(stg1," " , stg2)
This will work perfectly if source column1 ="A B C D", that is for a single string.
But here Data shows there are four columns, so in this case it won't work.
U have to duplicate this logic for every input column.