• Arnold Lieberman (7/19/2012)


    stuff((select ',' + ID

    from teste

    for XML path(''),TYPE).value('(./text())[1]','NVARCHAR(MAX)'

    ),

    1,

    1,

    '')

    This copes with any string length.

    ok... i loved the for XML path.

    The stuff it's kind of cute, but i didn't understand TYPE... and the ./text thing... I have to study more.

    Where can I learn more about this stuff?

    I only have the 2778 MS Quering SQL server 2005 lessons's in the bag, and a little experience.

    Thanks