Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

How would I merge multiple cell values into rows of another table? If this is the example of rows from a table with Columns 1/2/3:

Red / Sky / 1
Blue / Sand / 1
Blue / Sand / 2
Red / Sky / 2
Red / Sky / 3

I want a new table with Columns 1/2/3:

Red / Sky / 1-2-3
Blue / Sand / 1-2

Basically merging or concatenating the contents of column 3 for rows in which values in columns 1 and 2 match.

asked 20 Jun '12, 15:43

KenB's gravatar image

KenB
31113
accept rate: 0%


Look at the LIST aggregate function.

permanent link

answered 20 Jun '12, 15:49

Glenn%20Paulley's gravatar image

Glenn Paulley
10.8k577106
accept rate: 43%

Thanks. Worked perfectly.

(20 Jun '12, 15:55) KenB
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:

×8
×5

question asked: 20 Jun '12, 15:43

question was seen: 2,016 times

last updated: 21 Jun '12, 02:45