Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 SSIS Variable to Parameter to SQL Mapping
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Flowing Fount of Yak Knowledge

2780 Posts

Posted - 02/05/2014 :  12:00:32  Show Profile  Reply with Quote
An interesting article here about type mapping:

That link is mostly helpful but it leads to more questions:

1. Can we use the methods described in our SSIS packages? How? (Examples)

2. Is there a mapping of SSIS variable types to Parameter types and Parameter types to SQL types?

e.g The system variable System:StartTime is of type DateTime (in the Variables tab).

In the Execute SQL task, in the Parameters tab, there is no type DATETIME in the drop-down. There is DATE, DBDATE, DBTIMESTAMP and some others. Note that they are not the same as the variable types (thanks, SSIS, for making life difficult!)

Say that you want to pass the variable System::StartTime to a query in an Execute SQL Task where the SQL data type is DATETIME. We have:

Variable Variable Type SQL type Parameter tab type
----------------- ------------ -------- ------------------
System::StartTime DateTime DATETIME ???

By process of elimination, I discovered that the Parameter type in this case is DATE. That is confusing, since it actually does pass in the time as well.

Now, there are several SSIS variable types (11 in 2008-r2) and several Parameter types (27 in 2008-r2) and lots of SQL types. Is there a matrix somewhere that maps all three together?

Edited by - gbritton on 03/20/2014 15:55:46
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000