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: 
annick
Contributor III
Contributor III

How to concatenate items from a table

Hello,

I would like to concatenate all the items inside a table without changing the order in the table:

MyTable:
Load * Inline [
Item
'Z'
'A'
'C'
] (delimiter is ',');


LOAD
concat(Item) as ListOfItems
RESIDENT MyTable;

LET vListOfItems = peek('ListOfItems', -1);

==>

Currently vListOfItems = ACZ (i.e. ordered alphabetically)

I would like vListOfItems = ACZ to be = to ZAC (i.e. order in the initial table)

 

Many thanks

Kind regards

Annick

Labels (2)
1 Solution

Accepted Solutions
Or
MVP
MVP

Easiest way to ensure the load order would be to add a RowNo()/RecNo() field to the original table and then use that as the sort parameter in the concat() function, I think.

View solution in original post

1 Reply
Or
MVP
MVP

Easiest way to ensure the load order would be to add a RowNo()/RecNo() field to the original table and then use that as the sort parameter in the concat() function, I think.