I am trying to write an aggregate udf for using Sql Server 2008 and C# 3.5 that implodes an aggregation of data. The kind of syntax I am looking for is:
SELECT [dbo].[Implode]([Id], ',') FROM [dbo].[Table] GROUP BY [ForeignID]
where the second parameter is the delimiter for the aggregate function. And example return value would be something like:
1,4,56
Is there a way to have multiple parameters in an aggregate udf?