Page 1 of 1

Record by record comparison

Posted: Mon Mar 12, 2018 10:28 am
by dnat
Hi

I have some data like this

KeyID, Data1,Data2
1,test1,test2
1,mmm,nnn
2,ttt,bbb
2,444,888
1,vvv,bbb
1,sss,fff

And I want the data like this

KeyID,Data1,Data2,Data3,Data4
1,test1,test2,mmm,nnn
2,ttt,bbb,444,888
1,vvv,bbb,sss,fff

So, when there is a key, I would like to take all corresponding data from the next line. How could I possibly do that.

Looping or transformer stg variable? or any other ides?

Thanks!!

Posted: Mon Mar 12, 2018 2:10 pm
by chulett
Yes, either one. And technically it is a form of a vertical pivot of rows to columns so that could be yet another option for you.