Solved

Converting rows to columns(Oracle SQL)

Posted on 2009-05-08
1
1,301 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
ID: 24339133
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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
oracle query help 18 99
Convert Oracle data into XML document 2 59
SQL query question 8 39
Can anyone please tell me what does below Stored Procedure does? 4 19
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
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

910 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

16 Experts available now in Live!

Get 1:1 Help Now