Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
shekhar_analyti
Specialist
Specialist

How to get reverse of subfield results ? I mean how to merge two rows into one with desired output .

Hi All ,

How to get reverse of subfield results ? I mean how to merge two rows into one with desired output ..

    

Input
Action_IDVendorPersonnelDate
12221RanbaxyAnuj K3/3/2018
12221RanbaxyAnusha3/3/2018
12222RanbaxyManish3/3/2018
12223VcorpMadhav4/3/2018
12225MegoKusum5/3/2018
12223VcorpAnirudh4/3/2018

   

Output
Action_IDVendorPersonnelDate
12221RanbaxyAnuj K , Anusha3/3/2018
12222RanbaxyManish3/3/2018
12223VcorpMadhav , Anirudh4/3/2018
12225MegoKusum5/3/2018

Thanks & Regards

Shekar

1 Solution

Accepted Solutions
sasiparupudi1
Master III
Master III

Use Concat

Concat(Personnel,',')

Group By Action_ID


in script

Or in a straight table, use the expression Concat(Personnel,',') as Personnel

View solution in original post

3 Replies
sasiparupudi1
Master III
Master III

Use Concat

Concat(Personnel,',')

Group By Action_ID


in script

Or in a straight table, use the expression Concat(Personnel,',') as Personnel

shekhar_analyti
Specialist
Specialist
Author

I have tried that many time already , i dont know why its not working

A:

LOAD Action_ID,

     Vendor,

     Personnel,

     Date

FROM

[Merge two rows into one.xlsx]

(ooxml, embedded labels, table is Sheet1, filters(

Remove(Row, Pos(Top, 1)),

Remove(Col, Pos(Top, 10)),

Remove(Col, Pos(Top, 9)),

Remove(Col, Pos(Top, 8)),

Remove(Col, Pos(Top, 7)),

Remove(Col, Pos(Top, 6)),

Remove(Col, Pos(Top, 5))

));

B:

LOAD

Action_ID,

     Vendor,

     Concat(Personnel) as P,

     Date(Date,'DD/MM/YYYY') AS D

     Resident A Group By Action_ID,Vendor,Date ;

     DROP Table B ;

shekhar_analyti
Specialist
Specialist
Author

My bad :

A:

LOAD Action_ID,

     Vendor,

     Personnel,

     Date

FROM

[Merge two rows into one.xlsx]

(ooxml, embedded labels, table is Sheet1, filters(

Remove(Row, Pos(Top, 1)),

Remove(Col, Pos(Top, 10)),

Remove(Col, Pos(Top, 9)),

Remove(Col, Pos(Top, 8)),

Remove(Col, Pos(Top, 7)),

Remove(Col, Pos(Top, 6)),

Remove(Col, Pos(Top, 5))

));

B:

LOAD

Action_ID,

     Vendor,

     Concat(Personnel) as P,

     Date(Date,'DD/MM/YYYY') AS D

     Resident A Group By Action_ID,Vendor,Date ;

    DROP Table B ;

   DROP TABLE A ;