The solution is to create a batch file (.bat
) with your SQLCMD
command followed by a ECHO
command and run this file.
The contents of the file should be something like this:
SQLCMD -STest -Usa -PPassword1 >> C:\log.txt
ECHO "Have a nice day!" >> C:\log.txt
You can also try to play with @ECHO ON
or @ECHO OFF
at the beginning of the file depending if you run the .bat file from Command Prompt.