Solved

Converting rows to columns(Oracle SQL)

Posted on 2009-05-08
1
1,300 Views
Last Modified: 2013-12-07
I have a table in which there is a identifier against which I have email address. Now there can be multiple entries for a identifier. Example

a,a@b.com
a,b@b.com
a,c@c.com
b,m@b.com
b,k@c.com
c,c@c.com

I need to get the list of email addreess against each identifier a,b and c in a single row. could some body tell me how to do this in oracle sql.

the end result should be
a,a@b.com,b@b.com,c@c.com
b,m@b.com,k@c.com
c,c@c.com
I don't want to write code. I just want ot use query.
0
Comment
Question by:manjeetsc
1 Comment
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 50 total points
Comment Utility
please see this tutorial how to implement this function, usually known under the name of stragg:
http://www.sqlsnippets.com/en/topic-11591.html
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now