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
2.0k125138165
accept rate: 48%


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
39.7k358546815
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:

×125
×6

question asked: 08 Apr '19, 15:45

question was seen: 917 times

last updated: 08 Apr '19, 16:10