question

mahi222 avatar image
mahi222 asked

SSIS error while executing the package the variable mapping is not applied

Error: ForEach Variable Mapping number 1 to variable "User::Production_Area_long" cannot be applied. Error: The type of the value (DBNull) being assigned to variable "User::Production_Area_short" differs from the current variable type (String). Variables may not change type during execution. Variable types are strict, except for variables of type Object.
ssis errorvariables
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Tom Staab avatar image
Tom Staab answered
It looks like your recordset allows nulls. Try using ISNULL or COALESCE to convert the nulls to empty strings (or some other default value for non-string data types).
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.