How to convert data into xml

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jaisi
    New Member
    • Aug 2007
    • 5

    #1

    How to convert data into xml

    using sql query analyzer how data can be converted into xml format;

    Tried using for xml clause but some of the records are missing
  • Purple
    Recognized Expert Contributor
    • May 2007
    • 404

    #2
    Hi jaisi and welcome to TSDN MSSQL forum,

    Can you elaborate on which records are missing, can you post the query you have used..

    Regards Purple

    Comment

    • jaisi
      New Member
      • Aug 2007
      • 5

      #3
      Originally posted by Purple
      Hi jaisi and welcome to TSDN MSSQL forum,

      Can you elaborate on which records are missing, can you post the query you have used..

      Regards Purple
      Hi,

      If i give the below query[Select * From tablename
      For xml auto ,elements]

      the output iam getting is not a complete XML document but a XML fragment containing an element for each row returned by the query!!is it possible to create a well-formed XML Document by adding the root element as a wrapper around it?

      Comment

      Working...