Results 1 to 5 of 5

Thread: save to xml

  1. #1
    Join Date
    Dec 2002
    Location
    Antwerp, Belgium
    Posts
    227

    Unanswered: save to xml

    Hi,

    is it possible to save the results from a query to an xml file directly from sql server (so without the use of any visual studio languages). What I would like to do is that when a user on our site completes an order, this order is saved as an xml file.

    Thanks
    Johan

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Look in BOL for the syntax in a SELECT

    FOR XML AUTO

    there are lots of options...

    Never used it myself though
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Dec 2002
    Location
    Antwerp, Belgium
    Posts
    227
    yes, I know about the xml options. But those options format your query results. What I want to do is save these results to a physical xml file. The name of this file should be dynamically assigned. Do I use some kind of dts package or are there functionalities in for example SQLXM?
    Johan

  4. #4
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    bcp out a query or view from a stored procedure?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  5. #5
    Join Date
    Dec 2002
    Location
    Antwerp, Belgium
    Posts
    227
    Thanks Brett, thats what I thought. But perhaps I need to rephrase my question a bit: does anyone have some experience in using xml with SQL Server. What are the pros and cons? Did you use it directly or through an application?
    Last edited by jora; 11-11-03 at 16:28.
    Johan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •