cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to concatenate text from multiple rows into a single row in Flexible Search

Former Member
0 Kudos
2,574

Hi experts,

I would like to know if its possible to concat rows in flexible search like this way:

from:

  • COLUMNA COLUMNB

  • F000000001 XS150170112P

  • F000000001 FT200180136P

  • F000000002 DT125170118P

to:

  • COLUMNA COLUMNB

  • F000000001 XS150170112P, FT200180136P

  • F000000002 DT125170118P

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Adán!

You can achieve that with GROUP BY statement and GROUP_CONCAT function like this:

 SELECT {manufacturername}, GROUP_CONCAT(DISTINCT {name} ORDER BY {name} DESC separator ', ') FROM {product} GROUP BY {manufacturername}

In your example it would look like:

 SELECT {COLUMNA}, GROUP_CONCAT({COLUMNB} separator ', ') FROM {your_table} GROUP BY {COLUMNA}

Hope this helps!
Regards, Pawel

Answers (0)