Normally, WM_CONCAT is an aggregate function that return values from table separated by comma like here.
Suppose I have a table foo
like this:
You might want to use LISTAGG.
SELECT col_id,
LISTAGG(col_text, '|') WITHIN GROUP (ORDER BY col_text) text
FROM table1
GROUP BY col_id
Output:
| COL_ID | TEXT |
----------------------------
| 111 | This|a|is|test. |
SQLFiddle
UPDATE If you need to get distinct text values in a list
SELECT col_id,
LISTAGG(col_text, '|')
WITHIN GROUP (ORDER BY col_text) text
FROM
(
SELECT DISTINCT col_id, col_text
FROM table1
)
GROUP BY col_id
SQLFiddle