dbTalk Databases Forums  

Mapping correctly the SSIS variable datatype

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Mapping correctly the SSIS variable datatype in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Pasquale
 
Posts: n/a

Default Mapping correctly the SSIS variable datatype - 07-31-2009 , 05:48 AM






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

Reply With Quote
  #2  
Old   
Todd C
 
Posts: n/a

Default RE: Mapping correctly the SSIS variable datatype - 08-05-2009 , 08:01 AM






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


"Pasquale" wrote:

Quote:
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

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.