Go Directly To
Oracle Technology Network Community
My Oracle Support Community
OPN Cloud Connection
Oracle Employee Community
Oracle User Group Community
OTN Speaker Bureau
Get Started Guide
Join the world’s largest interactive community dedicated to Oracle technologies.
Learn from thousands of community experts
Get answers to your technical questions
Share your knowledge with peers
Please enter a title.
You can not post a blank message. Please type your message and try again.
SQL and PL/SQL
Database Application Development
SQL and PL/SQL
This discussion is archived
on Oct 20, 2008 4:18 PM by Frank Kulash
concatenate column values into a row
Oct 20, 2008 4:06 PM
Can any one please advise how to do this:
I have the column data as below:
I need the values to be displayed as
</strong>1 a; b; c;
2 d; e;
I need this to be done in a simple select command not a procedure. Please help.
Edited by: Rummy on Oct 20, 2008 12:05 PM
I have the same question
Show 0 Likes
This content has been marked as final.
Show 1 reply
Oct 20, 2008 4:18 PM
in response to
There are several solutions on [asktom.oracle.com|http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:2196162600402]
I recommend the first solution on that page, the user-defined function STRAGG. You can copy it verbatim once for all, and then use it everywhere, like this:
SELECT c1 , STRAGG (c2) FROM table_x GROUP BY c1;
In Oracle 10 (and up), you may already have a function named WM_CONCAT available, which is equivalent to STRAGG.