The forum will be down for maintenance at some point between Friday, September 25, 2020 at 5pm PDT and Sunday, September 27, 2020 at 11:59 PDT. Downtime is unknown but will be minimized.

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.

asked 08 Apr '19, 15:45

Baron's gravatar image

Baron
1.2k4770110
accept rate: 28%


Yes, the list aggregate function...

Such as

select list(table_name, ',' order by table_id)
from sys.systab
permanent link

answered 08 Apr '19, 15:54

Volker%20Barth's gravatar image

Volker Barth
36.7k343505761
accept rate: 34%

edited 08 Apr '19, 15:58

OK, thank you very much

(08 Apr '19, 16:00) Baron
Replies hidden

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

(08 Apr '19, 16:10) Volker Barth
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×116
×6

question asked: 08 Apr '19, 15:45

question was seen: 345 times

last updated: 08 Apr '19, 16:10