• Lynn Pettis (3/19/2009)


    Tell me, please, did it hurt? 😉

    [font="Verdana"]Well, it worked. It wasn't terribly quick though. And nor was it dynamic. I had to do a count of the maximum number of lines, then add a couple "just in case", and then a whole string of isnull([#], '')s...

    It wasn't pretty.

    The FOR XML though (which I have tested, and works well) is fast! 😀

    One word of warning: the FOR XML will also transform some control characters (such as a carriage return) into the form '& # x 0 D ;'. I actually don't mind that, a quick REPLACE() sorts it out.

    [/font]