GROUP_CONCAT string aggregate for SQL Server

Generally, when making sql requests, it is common to perform concatenation as well as group by in a single column.
In order to overcome this problem we found with an expert from ORCO. A project on codeplex allowing to update the sqlServer in script in order to have method GROUP_CONCAT in sql.
In practice :

The SQLCLR objects in this project allow you to write code like this:

SELECT some_id,
dbo.GROUP_CONCAT(some_column) AS as delimited_list
FROM dbo.some_table
GROUP BY some_id;

to retrieve a resultset like this:

some_id           delimited_list
----------------- -----------------------------------
1                 red,green,blue
2                 cyan,magenta,yellow,key

The URL of the project is :

I Hope it will be helpfull..

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s