2

I created a sql script that retrieve some information from database as a table format,

I have create a sqlcmd script that execute that query file, but in the output file I have the queries present in the .sql file + the results that are saved, result file http://prntscr.com/7e4j5i

I want only to have the result in that file

SQLCMD -S pcname\SQLEXPRESS -v VITI=%vl% -E -w 166 -e -i C:\db\input.sql -o C:\db\Book1.csv -s","  -w 700 -es

How can I do it?

Do I have to change something in the .sql file to exclude the queries from the results file?

1 Answer 1

2

Remove the -e parameter.

The -e parameter will echo the input (i.e. your SQL).

For info, see here.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.