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!

Group data using XMLAGG function

3174034Feb 25 2016 — edited Feb 25 2016

Hi All,

I have data in multiple columns, and i want to group the values using XMLAGG function, (Note: I dont want to use LISTAGG, since aggregate results may exceed 4000 chars).

Please find below data,

ABT-089CN-000394CNR-DRAFTBednarski,David,MChange Notice Response
ABT-089CN-000394CNR-DRAFTElangovan ACT3,Bargavi,XChange Notice Response
ABT-089CN-000394CNR-DRAFTPlaceholder #05,Test,Change Notice Response
ABT-089CN-000394CNR-DRAFTSeethapathy ACT77,Vidhya,Change Notice Response
ABT-089CN-000394CNR-DRAFTTest Act17,Bargavi,XChange Notice Response
ABT-089CN-000394CNR-DRAFTVikram ACT25,Prashanth,XChange Notice Response

And I want the data to be in single row, like

ABT-089CN-000394CNR-DRAFTBednarski,David,M || Elangovan ACT3,Bargavi,X ||Placeholder #05,Test, || Vikram ACT25,Prashanth,XChange Notice Response

Many Thanks.

This post has been answered by Paulzip on Feb 25 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 24 2016
Added on Feb 25 2016
2 comments
731 views