SQLCMD supports the -s parameter to specify the column separator, but I couldn\'t figure how how to represent the tab (CHAR(9)) character. I have tried the following but bo
Found a good answer here: SQLCMD outfile as tab delimited text file
Open Notepad Paste this: sqlcmd -S (local) -E -s"" -Q "select * from sys.dm_exec_query_stats" -o MyOutput.txt -h-1 -W Highlight , then hit the Tab key Save the file as MyBatch.bat Run MyBatch.bat
sqlcmd -S (local) -E -s"" -Q "select * from sys.dm_exec_query_stats" -o MyOutput.txt -h-1 -W