Error in Execute SQLTask Result

1

I am developing a project where in one of my execute sql task has a query,

select stuff((select ',' + campo from tabela FOR XML PATH(''))1,1,'') as resultado

this query returns so

|   resultado   |
|1,5,3,6,7,9,6,4|

and I'm putting this value inside an X variable that is of the String type of my SSIS package.

When doing this it returns the error:

[Execute SQL Task] Error: An error occurred while assigning a value to variable "X": "The type of the value (DBNull) being assigned to variable "User::X" differs from the current variable type (String). Variables may not change type during execution. Variable types are strict, except for variables of type Object.

".

[Execute SQL Task] Error: The value type (__ComObject) can only be converted to variables of type Object.
    
asked by anonymous 21.11.2014 / 15:36

0 answers