Heyy,使用BCP导出存储过程结果在SQL Server 2008
我试图使用BCP使用该查询SP结果导出到文本文件:
EXEC xp_cmdshell 'bcp "exec asmary..usp_Contract_SelectByEmpId -1,1" queryout "C:\test.txt" -w -C OEM -t$ -T -r ~ -S heba\HEBADREAMNET '
的输出此查询告诉这个错误:
Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near the keyword 'where'.
甚至以为我敢肯定的是,存储过程“usp_Contract_SelectByEmpId”工作正常。
以前有人遇到过这种错误吗?