• arty 15255 (3/21/2011)


    In regards distinct values:

    SELECT @s-2 = ISNULL(@s+',','')+field FROM dbo.TABLE

    GROUP BY field

    works well too.

    I forgot to mention that ORDER BY field works as well 🙂