Concatinating Multiple Rows in SQL

Posted by Dave C on Stack Overflow See other posts from Stack Overflow or by Dave C
Published on 2010-04-28T18:43:13Z Indexed on 2010/04/28 18:47 UTC
Read the original article Hit count: 234

Filed under:
|

Hello,

I have a table structure that looks like this:

ID   String
-----------
1     A
1     Test
1     String
2     Dear
2     Person

I need the final output to look like this:

ID  FullString
--------------------
1   A, Test, String
2   Dear, Person

I am really lost on how to approach this... I looked on a couple examples online but they seemed to be VERY complex... this seems like it should be a real easy problem to solve in sql.

Thank you for all assistance!

© Stack Overflow or respective owner

Related posts about sql

Related posts about mysql