Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/67.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
SQLcmd输出还包含不需要的输入SQL语句_Sql_Sql Server_Sql Server 2008_Sqlcmd - Fatal编程技术网

SQLcmd输出还包含不需要的输入SQL语句

SQLcmd输出还包含不需要的输入SQL语句,sql,sql-server,sql-server-2008,sqlcmd,Sql,Sql Server,Sql Server 2008,Sqlcmd,我创建了一个sql脚本,它以表格格式从数据库中检索一些信息 我创建了一个sqlcmd脚本来执行该查询文件, 但在输出文件中,.sql文件中有查询+保存的结果, 结果文件 我只想把结果放在那个文件里 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 我怎么做 是否必须更改.sql文件中的某些内容才能从结果文件中排除查询?删除-e

我创建了一个sql脚本,它以表格格式从数据库中检索一些信息

我创建了一个sqlcmd脚本来执行该查询文件, 但在输出文件中,.sql文件中有查询+保存的结果, 结果文件

我只想把结果放在那个文件里

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
我怎么做


是否必须更改.sql文件中的某些内容才能从结果文件中排除查询?

删除
-e
参数

-e
参数将回显输入(即您的SQL)

有关详细信息,请参阅