Please be aware that the SAP SQL Anywhere Forum will be shut down on August 29th, 2024 when all it's content will be migrated to the SAP Community.

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.2k144153181
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
40.5k365556827
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: 1,199 times

last updated: 08 Apr '19, 16:10