Is it possible to change the destination file name from within a sql batch (using the query analyzer) when saving results of a query to file. For instance, I can use the toolbar to send the results of a query (or batch) to file. But if I have a batch with 2 queries, can I get it to send the results of the first to file A, and the results of the second to file B.
What I'm trying to do is run a script which will output the results of various queries to about 8 different text files...
Thanks for any help...