concatenate multiple rows into a single row

Hi, There
How can we do what mentioned in the attached Excel file? In other words, I want to get the generated result of below SQL script but without writing it directly into a DB node. The direct writing takes a long time and more spaces.

SELECT ID,
TRIM(TRAILING ‘,’ FROM (XMLAGG(TRIM(String)|| ‘,’ ORDER BY String) (VARCHAR(10000)))) as Strings
FROM db.table
GROUP BY 1

example.xlsx (8.5 KB)

Hi @ahmed_gomaa

See this workflow concatenate multiple rows into a single row.knwf (13.8 KB)


gr. Hans

4 Likes

Right! You could also do the column and row filtering in the Excel Reader node. :+1:

:blush:

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.