Page 1 of 1

Implement the below logic

Posted: Sat Dec 17, 2011 7:08 pm
by vskr72
I have 3 cols like this:

Code: Select all

Col1,    Col2,   Col3
-----------------------
ABC,           ,
      ,     DEF, 
      ,          ,   XYZ 

I need to convert this into a single row:

Code: Select all

Col1,    Col2,   Col3
-----------------------
ABC,    DEF,   XYZ
I tried using an AGG, but it did an implicit conversion into some numbers. Is it possible to do it in any other way. Pls suggest.

Posted: Sat Dec 17, 2011 9:25 pm
by chulett
You should still be able to use an Aggregator for this by telling it to 'retain data type'... or something very close to that.

Posted: Sat Dec 17, 2011 9:29 pm
by pandeesh
In transformer using Stage variables,you can accomplish this.
Consider you are having 3 columns always,then check for Field(input,",",1),if it's not null then store it in a stage Variable.
Next record check Field(input,",",2) and Append it to the previous stage Variable.
FInally take the last record from the transformer.

Please let me know if you need any more information

Posted: Sat Dec 17, 2011 10:47 pm
by vskr72
Thank you Craig. That solution worked well.

Posted: Sun Dec 18, 2011 12:28 am
by pandeesh
So, Can you please resolve?

Thanks