我试图通过SQL Server ManageMent Studio中的命令行在多个电子邮件的变量中传递作业,但是,它会为特定的SET调用抛出错误。仅供参考,User :: gEmailTo是包中的字符串。
在我的工作创建脚本中,我有以下内容 -
- 声明
:setvar EmailTo" josh@test.com; mike@test.com; earl@test.com; mark@test.com; bill@test.com"
- 抛出错误的语法:
'/SET "\package.Variables[User::gEmailTo].Value";"$(EmailTo)" '
SSMS中作业的命令行输出显示:
/SET "\"\package.Variables[User::gEmailTo].Value\"";"\"josh@test.com; mike@test.com; earl@test.com; mark@test.com; bill@test.com\""
错误
Argument ""\package.Variables[User::gEmailTo].Value;josh@test.com; mike@test.com; earl@test.com; mark@test.com; bill@test.com"" for option "set" is not valid. The command line parameters are invalid. The step failed.