Is that the only way to achieve what I want? The reason
is because xp_cmdshell is a controlled stored procedure in
my environment and I can't open up this access to my users.
Is there an alternative?
>Hello Audrey !
>Go to BOL, check BCP copying data from query to datafile:
>bcp "SELECT au_fname, au_lname FROM pubs..authors ORDER
>queryout Authors.txt -c -Sservername -Usa -Ppassword
>Execute with SP_CMDshell
>HTH, Jens S?meyer
>> I have just written a stored procedures to query from a
>> couple of tables and pipe the results to a temp table.
>> After which, I want to perform a query from this table
>> save the information to a text file. How can I go about
>> doing it within the stored procedure? Please advise.