Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

formatting data in sql

Status
Not open for further replies.

je27

IS-IT--Management
Oct 3, 2002
15
US
I have a query that is looking in many different tables and I am trying to see if there is a way to retrieve the data below so that it removes duplicates but puts the values that are not dupilicate in the same cell with a comma delimiter.
Tables:
Name.......Code....Well....Project
ST10959....16027...H1......one
ST10950....16027...A2......two
KB106832...5410....B2......three
KB106832...15678...B2......three
KB106832...13069...B2......three
U15527.....15410...C2......four
U15527.....15768...C2......four
KB106832...5410....D2......five
KB106832...15678...D2......five

This is the way the table looks (see above)
there are more than one codes for each project.
I want to return the codes but without all the information.

Is there anyway in sql to return the table like this or something similar to this:

Name.......Code....................Well...Project
ST10959....16027...................H1.....one
ST10950....16027...................A2.....two
KB106832...5410,15678,13069...B2.....three
U15527.....15410,15768...........C2......four
KB106832...5410,15678............D2......five

 
This is a relational oracle database.

 
please try your question in one of these forums --

forum185 Oracle: Oracle release - 5, 6, and 7
forum186 Oracle: Oracle release - 8 and 8i
forum759 Oracle: Oracle release - 9i
forum1177 Oracle: Oracle release 10g

r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top