【发布时间】:2011-08-01 04:52:15
【问题描述】:
我有一个带有执行 SQL 任务的 SSIS 包。 这是代码
declare @vPersonSourceTgt int, @CntFlag int
set @vPersonSourceTgt = (select count(*) from tbl_ONL_Person)
set @CntFlag = case when @vPersonSourceTgt = ? then 1 else 0 end
select @CntFlag as vTargetCntFlag
我已确保参数映射中的输入参数名称为 0。 在 BIDS 中一切正常,但是当我在 SQL 代理中部署包时。它失败并出现以下错误。
Description: Executing the query "declare @vPersonSourceTgt int, @CntFlag int set @vPersonSourceTgt = (select count(*) from tbl_ONL_PALSAccountPerson) set @CntFlag = case when @vPersonSourceTgt = ? then 1 else 0 end select @CntFlag as vTargetCntFlag" failed with the following error: "Parameter name is unrecognized.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. End Error DTExec: The package execution returned DTSER_FAILURE (1).
任何帮助将不胜感激。 谢谢!
【问题讨论】:
标签: ssis