Listagg Usage to get a specific type of o/p

All posts relating to Oracle PL/SQL development.

Moderator: Tim...

Listagg Usage to get a specific type of o/p

Postby oecboy » Mon Mar 18, 2013 7:02 pm

Hi. I have a table with data in below format:
Table A
Id Value
1 R
2 S1
2 S2
3 T

I need the o/p in below format:
Col
R|S1|T
R|S2|T

This might vary. The general idea is that multiple value for any given id must be aggregated separately.
Any help will be awesome. Thanks in advance.

Regards
Vicky
oecboy
Member
 
Posts: 1
Joined: Mon Mar 18, 2013 6:53 pm

Re: Listagg Usage to get a specific type of o/p

Postby Tim... » Mon Mar 18, 2013 9:27 pm

Hi.

At first glance this seems like a normal string aggregation thing.

http://www.oracle-base.com/articles/mis ... niques.php

Actually, it's quite different. I'm really not sure how I would approach this. I will mull it over, but nothing springs to mind...

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17950
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK


Return to Oracle SQL and PL/SQL Development

Who is online

Users browsing this forum: No registered users and 1 guest