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 > Database Server Software > DB2 > Equivalent of Group_Concat() in DB2?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-21-06, 17:54
celios celios is offline
Registered User
 
Join Date: Jul 2006
Posts: 1
Equivalent of Group_Concat() in DB2?

Hi,

I am trying to achieve a result equivalent to the MySQL Group_Concat() (also known as LIST() in some database SQL dialects I think) in DB2.

I have a table like this:

User ID Group
------- -------
1 Admin
1 Readers
2 Admin
3 Moderator
3 Admin
3 Readers

And I want to get a result like:

User ID Group
------- -------
1 Admin, Readers
2 Admin
3 Moderator, Admin, Readers

My DB2 SQL skills aren't very good I was wondering if anyone knows of a function equivalent to Group_Concat(), or an alternate way to get the desired result in DB2 SQL?

Any help greatly appreciated.
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