Solved

Converting rows to columns(Oracle SQL)

Posted on 2009-05-08
1
1,302 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sql query 5 79
Oracle - Query Insert and Update multiple tables 5 68
VB.Net - CSV to Oracle table 4 67
help on oracle query 5 43
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…
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.

816 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

12 Experts available now in Live!

Get 1:1 Help Now