Why is my output being truncated?

  • I am trying to write my first stored procedure to generate XML data. Right now, I am experimenting with the syntax, to learn what it produces, in Query Analyzer. I have found that, for some reason, the output appears to be truncated. For example, when using FOR XML AUTO, I get the following at the beginning of the XML:

    <isr ClientNumber="125654" CaseNumber="1">

    But the XML data ends like this:

    <vw DischargeDate="2003-07-14T00:0

    That, clearly, is not a well-formed XML tag.

    What is going on? Is there some sort of built in truncation going on, which is preventing the data from being properly formatted?


    Doctor Who

  • Could be due to output size limitation set in the query analyzer.

    Note that when you say for xml the output comes as a single column value.

    In query analyzer there is a limit on maximum number of characters for a column. By default this is set to 255. Try changing it to 8912 (max).

    After this if data still gets truncated then you can use either OSQL to dump the data to file or use xml support of IIS to get the data on browser (which wont be truncated).

  • That was it, Raj, thanks.

    quote:


    Could be due to output size limitation set in the query analyzer.

    Note that when you say for xml the output comes as a single column value.

    In query analyzer there is a limit on maximum number of characters for a column. By default this is set to 255. Try changing it to 8912 (max).

    After this if data still gets truncated then you can use either OSQL to dump the data to file or use xml support of IIS to get the data on browser (which wont be truncated).



    Doctor Who

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

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