saving query results to file using SQL

  • I need to run a whole lot of separate processes and save each run to a text file for our auditors. Is there a method using SQL where I can define the filename and have it save the file automatically without prompting me each time?

    Then I can just make a temp table of the criteria and have it just crank away.

  • You will have to use OSQL to export data directly to a file; or dts packages.

    Since I am taking a guess this is one off I would recommend OSQL :).

    Thanks.

    [font="Arial"]---

    Mohit K. Gupta, MCITP: Database Administrator (2005), My Blog, Twitter: @SQLCAN[/url].
    Microsoft FTE - SQL Server PFE

    * Some time its the search that counts, not the finding...
    * I didn't think so, but if I was wrong, I was wrong. I'd rather do something, and make a mistake than be frightened and be doing nothing. :smooooth:[/font]

    How to ask for help .. Read Best Practices here[/url].

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

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