If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Concatenating a Single Field, Multiple Records

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-19-04, 11:01
BrianPHL BrianPHL is offline
Registered User
 
Join Date: Mar 2004
Posts: 1
Question Concatenating a Single Field, Multiple Records

I am new to SQL and are having a tough time with this particular query. I need a way to group multiple records into one and concatenate text data from a single field.

If this is the data within the table:

ID SEQ SOME_FIELD
1 1 Mark
1 2 Paul
1 3 John
2 1 Mark
2 2 Paul
3 1 Chris
3 2 Jen
3 3 John
3 4 Doug
3 5 Steve

This is what I want to return in the query:

ID SOME_FIELD
1 Mark, Paul, John
2 Mark, Paul
3 Chris, Jen, John, Doug, Steve

I really need it to be a concatenated result with some delimiter.

I am using Oracle 9i.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On