Discussion:
Mapping correctly the SSIS variable datatype
(too old to reply)
Pasquale
2009-07-31 10:48:01 UTC
Permalink
I need to map correctly the SSIS variable datatype with the datatype of a
column returned from a T-SQL query. Does exist a prospectus about this
subject?
F.e. I have this error:
"The type of the value being assigned to variable "User::..." differs from
the current variable type. Variables may not change type during execution.
Variable types are strict, except for variables of type Object. "
I have mapped my SSIS variable with the returned column of a query inside
Execute SQL Task. This column is a numeric(9,0) identity.
Thanks
Todd C
2009-08-05 13:01:01 UTC
Permalink
Pasquale:

How are you using the T-SQL query in SSIS? Is it as the Source in a Data
Flow, or the command in an Execute SQL task? (I'm assuming the latter.) How
do you have your Result Set mapping set up? On the General page, have you
selected Single Row, or Full Result Set? It matters big time how you set up
your Result Set page based on the Result Set type.

If Single Row, then you will need a Result Set mapped column for each
expected column in the query, named 0 through N.

If you have Full Result Set or XML, you will need a single Result Set
mapping named 0 of type Object, which will hold the entire table contents.

Check BOL for SSIS result sets

Can you give us some insight into what the purpose of the query is? perhaps
we can assist in that regard.

HTH
=====
Todd C
Post by Pasquale
I need to map correctly the SSIS variable datatype with the datatype of a
column returned from a T-SQL query. Does exist a prospectus about this
subject?
"The type of the value being assigned to variable "User::..." differs from
the current variable type. Variables may not change type during execution.
Variable types are strict, except for variables of type Object. "
I have mapped my SSIS variable with the returned column of a query inside
Execute SQL Task. This column is a numeric(9,0) identity.
Thanks
Loading...