Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

concatenate group by row values

user6287828May 13 2009 — edited Oct 19 2011
Hello

this might be a very common question. How to concatenate string belonging to group by clause.

A similar question was asked somewhere here
2074419

but the suggested method ( given on that page as well as this link
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:2196162600402
) only works when the group by is an number type.
Like the exmple used on above page has group by deptno.

But in my case its like ...both columns are varchar

locationid employeeName
AA Robert
AA Jennifer
AB Walsh
AC Sophie
AB David
AB Neha

and I need something like this


locationID empleeList
AA Robert, Jennifer
AB Walsh,David, Neha
AC Sophie


when I execute ..it just never returns the control and keeps executing
This post has been answered by Hoek on May 14 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 16 2011
Added on May 13 2009
21 comments
18,098 views