Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2002
    Posts
    74

    Unanswered: SQL Server Query Results in a text/xml file

    Hello folks!

    I have written a query that I need to save results of. Is there some statement that I can place at the top of my query (like we can do in Oracle through spool command) to specify the directory\filename to save query results to? Eventually I need to schedule this to run daily via a DTS package.

    Please let me know if you've come across this before?

    Thanks so much!

    -Parul

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    You would specify the file destination in your DTS package, not in the query itself.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  3. #3
    Join Date
    Oct 2002
    Posts
    74

    SQL Server Query Results in a text/xml file

    Thanks for your response! How do I save the query as a task DTS package? I don't think I have done this before.

    -Parul

  4. #4
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    You can save your query as a view and reference it in your package, or you can include the SQL statement in the package.

    Read up on DTS packages in Books Online. DTS is very versatile, but not very intuitive or user-friendly.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

Posting Permissions

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