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, 15:45

Sarkis's gravatar image

Sarkis
502293559
accept rate: 11%


Yes, the list aggregate function...

Such as

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

answered 08 Apr, 15:54

Volker%20Barth's gravatar image

Volker Barth
34.2k334490722
accept rate: 33%

edited 08 Apr, 15:58

OK, thank you very much

(08 Apr, 16:00) Sarkis
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, 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:

×114
×5

question asked: 08 Apr, 15:45

question was seen: 160 times

last updated: 08 Apr, 16:10