result set gets truncated

  • Hello,

    I am working on a huge XML file. I am trying to update a XML file. I am saving the broken parts into a variable of nvarchar(max) type Datatype. Later on i am trying to concatenate all parts to get back my xml file(post update). I realized that a few of the parts are truncated.

    Any help??

    file name my_XML_file

    breaking into 3 pieces of nvarchar(max) type @part1,@part2, and @part3

    changing in all three parts

    later i concatenate all 3 parts @part1+@part2+@part3 to get back my xml file.

  • This was removed by the editor as SPAM

  • ekant_alone (7/27/2011)


    Hello,

    I am working on a huge XML file. I am trying to update a XML file. I am saving the broken parts into a variable of nvarchar(max) type Datatype. Later on i am trying to concatenate all parts to get back my xml file(post update). I realized that a few of the parts are truncated.

    Any help??

    file name my_XML_file

    breaking into 3 pieces of nvarchar(max) type @part1,@part2, and @part3

    changing in all three parts

    later i concatenate all 3 parts @part1+@part2+@part3 to get back my xml file.

    How are you checking for truncation? If it's by what appears on the screen, you have to remember that the output of columns are typically truncated when they go over 8K (or whatever your display settings are). Use LEN or DATALENGTH/2 (because it's uni-code) to verify the length after concatenation.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply