SQL export to text file - unwanted message at end

For rowcount, use SET NOCOUNT ON before the T-SQL statements you're running.

For completion time, go to Tools->Options->Query Execution->SQL Server->Advanced and look for "Show Completion Time" and un-check it. I can't remember when that option was added, it's in version 18.7 of SSMS, but wasn't in earlier versions.

BTW the SQLCMD utility never includes completion times, if you need to automate query output.

3 Likes