cancel
Showing results for 
Search instead for 
Did you mean: 

merging several rows into one single row

Baron
Participant
1,517

Is there any reverse procedure for the sa_split_list procedure? I have a select statement which delivers one column with several rows, and I want to have all those rows in one row.

Accepted Solutions (1)

Accepted Solutions (1)

VolkerBarth
Contributor

Yes, the list aggregate function...

Such as

select list(table_name, ',' order by table_id)
from sys.systab
Baron
Participant
0 Kudos

OK, thank you very much

VolkerBarth
Contributor
0 Kudos

FWIW, the combination of list() and sa_split_list() is a powerful tool to split and re-combine contents (or vice-versa)...

Answers (0)