• hunchback (11/12/2013)


    Have the descriptor in a separated file and do the concatenation at the command side using COPY.

    c:\>copy f1 /B + f2 /B f3 /B

    Why would someone use the file system just to add a separate row?

    If the output is finally stored in a file, why not using the VARCHAR() data type inside SQL Server?

    If the output is used by a different application, then this app should "convert" the output to xml (which is an implicit conversion).

    There's just not enough information provided so far why it has to be XML format within SQL Server...

    Btw: If you add the encoding outside SQL Server and re-import the file into an xml variable, the encoding is gone again...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]