• WayneS (8/20/2008)


    Paul DB (8/20/2008)


    anil_mootha (8/20/2008)


    Hi,

    Why would you prefer to build XML strings manually when you can do it with FOR XML statement.

    The very purpose of FOR XML statement would be void otherwise.

    Thanks and regards

    Anil

    I'm also interested in knowing the answer to Anil's question. Have a great day. 😎

    Pure and simple laziness. In the article, I mentioned I was troubleshooting a performance issue. I was checking to see if the problem was in the processing of the xml string (not the creating of it). I just wanted something quick and dirty to build a string so that I could test it. (Turned out to not be so quick... ) I don't use the FOR XML clause that frequently, so when I do I usually need to check it's syntax to get it right.

    I am also not familiar with FOR XML. 🙂 Could anyone show us how one of Wayne's queries would look using FOR XML instead? I'd offer 1 point, if I could. 😉

    Paul DB