I’m using SQL Server SSMS to output a query to a space delimited text file. It works fine with one exception. At the bottom of the file it prints a message about how many lines it printed just like when the query is routed to the results grid in SSMS:
id sales region
001 100,000 North
001 100,000 North
001 100,000 North
001 100,000 North
001 100,000 North
... ... ...
(78482 row(s) affected)
This is a problem as there are multiple files and they are read into another program where this message causes an error.
I’ve looked around in the output and query options but don’t see any way to fix this.
Any suggestions?
set nocount onin the beginning of the query/inputfile.