I've tried to replace the legacy sqlcmd with the sqlcmd-go, but I've noticed a difference that I can't find in the documentation.
When running sqlcmd-go from a program, by creating a subprocess and writing/reading stdin/stdout a line prompts can be found in the output. This does not happen with original sqlcmd.
Example:
Program writes to the process stdin following commands:
- SET NOCOUNT ON;
- select * ...;
- go
- exit
Then the stdout output will look like this
1> 2> 3>
<QUERY OUTPUT>
1>
Is there a way to avoid this, while keeping the ability to interactively communicate commands via stdin/stdout as a subprocess?