Date parsed: 21/10/2007 08:06:07
Date: Sun, 21 Oct 2007 12:06:07 -0400
See the following post from Anith Sen:
http://groups.google.com/group/microsoft.public.sqlserver.programming/msg/2d85bf366dd9e73eAnd the following article:http://www.projectdmx.com/tsql/rowconcatenate.aspx
--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
<matanel@hotmail.com> wrote in message
news:1192969108.895511.260070@i13g2000prf.googlegroups.com...
>I need to implement a new aggregate function to aggregate strings,
> how can I do it in mssql??
> More details:
> I have a table with 2 columns fk and name like this:
> fk| name
> --------------
> 1 | a
> 2 | b
> 1 | c
> 1 | d
> 2 | e
> 2 | f
> 3 | g
>
> and after use something like this:
> select fk,custom_aggregate_func(name) as result from table group by fk
> the result will be:
> fk | result
> -------------
> 1 |a,c,d
> 2 |b,e,f
> 3 |g
>
> Does anyone knows a technique for implementing this in mssql??
> I know that in oracle 10g there is function called collect for this
> feature, is there anything like that for mssql??
> thanks
>