O/p in mentioned Format
Moderators: chulett, rschirm, roy
O/p in mentioned Format
Hi,
I have a requirement where i need to merge the data coming under 2 columns into one.i.e say if i have 2 columns
COLA COLB
A 10
A 20
A 30
A 40
B 50
B 60
B 70
and the output should be presented in one column i.e
COL
A
10
20
30
40
B
50
60
70
Please help in achieving the logic.
Regards,
Balakrishna
I have a requirement where i need to merge the data coming under 2 columns into one.i.e say if i have 2 columns
COLA COLB
A 10
A 20
A 30
A 40
B 50
B 60
B 70
and the output should be presented in one column i.e
COL
A
10
20
30
40
B
50
60
70
Please help in achieving the logic.
Regards,
Balakrishna
Will you please explain me in detail.The o/p with the pivot will be
A
10
A
20
A
30
.
.
B
50
B
60
.
.
Please explain me how i need to proceed after this.
The output here should be in the exact format i.e (10,20,30,40) should exactly come under A and (50,60,70) should come next to B.This order should be strictly followed.
It is something like Parent Child relationship where A,B will be acting as parents and (10,20,30,40,50,60,70) will be their respective childs.
A
10
A
20
A
30
.
.
B
50
B
60
.
.
Please explain me how i need to proceed after this.
The output here should be in the exact format i.e (10,20,30,40) should exactly come under A and (50,60,70) should come next to B.This order should be strictly followed.
It is something like Parent Child relationship where A,B will be acting as parents and (10,20,30,40,50,60,70) will be their respective childs.
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
I tried the logic using the stage variables.PFB the details of the same.Initial values for these stage variables are null
svcolA = COLA
prevscolA = svcolA
svcolB = COLB
prevscolB = COLB
On the output part of the transformer stage under the single column,i have written the logic as
(If svcolA = prevscolA then COLB else prevscolA)
and with the mentioned input in early post the output i'm getting is
A
10
20
30
B
50
60
The last record in A and B are missing.
svcolA = COLA
prevscolA = svcolA
svcolB = COLB
prevscolB = COLB
On the output part of the transformer stage under the single column,i have written the logic as
(If svcolA = prevscolA then COLB else prevscolA)
and with the mentioned input in early post the output i'm getting is
A
10
20
30
B
50
60
The last record in A and B are missing.
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom