• Oleg Netchaev (5/20/2010)


    honza.mf (5/20/2010)


    Thank you, Hugo, for your help.

    Lot of people cannot distinguish complete XML file and XML segment.

    Because they cannot, you can ask Steve to edit one of the lines in your question to read

    select * from #t for xml auto, root('rows');

    This will prevent the problems with XML segment problem as the result will include the root element.

    Let me say one more time that I really enjoyed the question. Thank you.

    Oleg

    You are right. It could help.

    But I don't know, I wanted this question to be more about XML than about SQL. And the fact, query with simple FOR XML AUTO returns XML segment and not complete XML, can be sometimes important.



    See, understand, learn, try, use efficient
    © Dr.Plch