Experts Exchange connects you with the people and services you need so you can get back to work.
The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!
drop table tab1 purge;
create table tab1(col1 char(1), col2 varchar2(5));
insert into tab1 values('A','Test1');
insert into tab1 values('A','Test2');
insert into tab1 values('B','Test3');
insert into tab1 values('B','Test4');
--XML example from: http://www.experts-exchange.com/Database/Oracle/Q_24914739.html?#a25864822
EXTRACT(XMLAGG(XMLELEMENT("s", col2 || ' ')), '/s/text()').getstringval(),
GROUP BY col1
select col1, listagg(col2, ' ') within group (order by col2)
group by col1
Open in new window
Author Closing Comment
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
Join the community of 500,000 technology professionals and ask your questions.
Join & Ask a Question
Join our community for more solutions or to ask questions.
For immediate help use Live now!