• Sweet code.

    On the

    SELECT @a = (SELECT SUBSTRING(@a,1,LEN(@a)- 1))

    --Trim off the final comma; I'm sure there is a better way to do this...

    Why not just do a

    SELECT @a = LEFT(@a,LEN(@a)- 1)



    ----------------
    Jim P.

    A little bit of this and a little byte of that can cause bloatware.