have my Input data like
ID NUM CODE
1 5 SAM1
1 5 SAM2
1 5 SAM3
1 4 SAM4
2 7 REC1
2 7 REC2
2 7 REC3
12 8 REC1
13 9 REC2
17 10 REC22
17 10 RECDDD
20 56 ACD
In the output i need to display data like
ID CODE
1 5| SAM1| SAM2|SAM3
1 4|SAM4
2 7|REC1|REC2|REC3
12 8|REC1
13 9|REC2
17 10|REC22|RECDD
20 56|ACD
How to Achive bellow logic in datastage
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 120
- Joined: Thu Oct 28, 2004 4:24 pm
Try this stage
PxCombineRecords Stage
Combine records with identical keys into single record
Data restructuring stage for Parallel Extender jobs, which combines rows in which particular key column's values are identical into vectors of subrecords.
Or
If you are using 8.5 use the new functionality (looping) with the functions lastrowingroup and so on.
PxCombineRecords Stage
Combine records with identical keys into single record
Data restructuring stage for Parallel Extender jobs, which combines rows in which particular key column's values are identical into vectors of subrecords.
Or
If you are using 8.5 use the new functionality (looping) with the functions lastrowingroup and so on.
"Don't let the bull between you and the fence"
Thanks
Gregg J Knight
"Never Never Never Quit"
Winston Churchill
Thanks
Gregg J Knight
"Never Never Never Quit"
Winston Churchill
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I have used Kaps recommendation in this thread(using staging vars and then remove dupes). I noticed a reference in this thread to using the loop construct in a transformer stage in 8.5. Everything I have read so far indicates the xfm loop allows one to split a single row into many or add an aggregate value to each row. I don't see a reference to combining multiple rows into 1. I will do some more research, any suggestions appreciated tough.
Thanks
Robert
Thanks
Robert
We don't see things as they are;
We see them as we are.
We see them as we are.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: