How do i write the results of a query to a text file?
The query uses the "PRINT" command to display the reults from the query in the display pane in queryanalyzer, but what i want is to write the result into a text file which can be attached to a mail later on.
I´ve scheduled the script as a job and configred it to write the result to a text file. It works fine but i recieve an annoying [SQLSTATE 01000] at the end of each row in the text file.
How do i solve this?
Thankful for every reply
The query uses the "PRINT" command to display the reults from the query in the display pane in queryanalyzer, but what i want is to write the result into a text file which can be attached to a mail later on.
I´ve scheduled the script as a job and configred it to write the result to a text file. It works fine but i recieve an annoying [SQLSTATE 01000] at the end of each row in the text file.
How do i solve this?
Thankful for every reply