Page 1 of 1

Help en Promote SubRecord

Posted: Tue Sep 04, 2007 7:37 am
by chanthou_2000
Hi everyone,

I'm quite beginner in some PX Stage like "Promote Subrecord" and i have
some questions :
my record look like this :

a,b,c,d
a,e,f,g
b,h,i,j
b,k,l,m

and i want the following result :
a,b,c,d,e,f,g,h
b,h,i,j,k,l,m

1) can the "Promote Subrecord" stage do this ? i guess yes, but i want to be sure about this

2) I tried to use it but it always return me the error message
"Not an aggregate field" !!! what does it means ?

3) How to use this stage (Input/Output), it's very weird !!

Thanks

Chanthou

Posted: Tue Sep 04, 2007 4:45 pm
by ray.wurlod
No. If you promote the subrecord you won't get the subrecord column AND the contents of the subrecord - you can't have both.

Posted: Wed Sep 05, 2007 12:50 am
by chanthou_2000
ray.wurlod wrote:No. If you promote the subrecord you won't get the subrecord column AND the contents of the subrecord - you can't have both. ...
Ok but do you know a stage which could do this kind of operation ?
The documentation from ascential is not very clear about that ..

thanks

Posted: Wed Sep 05, 2007 12:53 am
by balaiah
one try with "pivotstage"

Posted: Wed Sep 05, 2007 1:09 am
by Maveric
A vertical pivot will work. You will have to concatenate the values like "b e", "c f" and then use field function to map the values to the target fields. Do a search on "vertical pivot". One of those posts will give you the logic.

Posted: Wed Sep 05, 2007 4:26 pm
by ray.wurlod
You could split the stream into two copies, run one copy through a Promote Subrecord stage and join the two copies subsequently, selecting appropriate columns from each input to the Join stage.