sql - SQLCMD is appending newline and "1" in the query results -
I am calling the sqlcmd utility from ksh script to recover dummy record and store it in a variable
MY_VAR = `sqlcmd -s server, port-u username -p password -dbn-h-1-w -k" SET notation on; select dummy '; "` I hope to keep "codex" MY_VAR as "dummy" because it is the returned row with the query, and the use of -h -1 is the header To remove that And -वे to delete the back position but instead, output dummy 1 not me Know that 1 is coming. I am firing the query myself and rightly giving it to me as a "dummy" result.
Use uppercase -Q and you can skip both ; I guess & gt; SQLCMD.EXE -E-S. Note SET on \ SQLEXPRESS -W -h -1 -Q "Select Dummy" "Dummy"
Comments
Post a Comment