我正从一些表中检索一些列(下面两个是负责错误的)
CUSTOMER_ID - numeric(9)
INCIDENT_ID - int(4)
并将结果移动到foreach loop container
(在将结果移动到记录集之前使用派生转换,即CUSTOMER_ID - DT_NUMERIC,INCIDENT_ID - DT_I4)但我最终得到了这两个错误
ForEach Variable Mapping number 3 to variable "User::CUSTOMER_ID" cannot be applied.
ForEach Variable Mapping number 6 to variable "User::INCIDENT_ID" cannot be applied.
The type of the value being assigned to variable "User::CUSTOMER_ID" differs from the
current variable type. Variables may not change type during execution. Variable types
are strict, except for variables of type Object.
The type of the value being assigned to variable "User::INCIDENT_ID" differs from
the current variable type. Variables may not change type during execution. Variable
types are strict, except for variables of type Object.
我尝试了isnull()
两列但没有用,我搜索了很多但没有克服它。
请帮忙。
答案 0 :(得分:0)
SSIS在这方面是不可挑剔的挑剔。
检索这些列时,我会将它们转换为文本,例如NVARCHAR(50)。然后For Each循环容器中使用的变量可以使用Data Type = String。