SQL Server and SSIS Data Types

Many times we are in need of cross-references between SQL Server data types and the data types available with SQL Server Integration Services. This is very much needed when we require to set a variable in SSIS from a result set returned from Execute SQL Task or when we need to pass parameters to SQL Query/Procedure.

Following table list the data type mapping between SQL Server (2005) data type and SSIS Data Type:

SQL Server Data Type SSIS Data Type
tinyint DT_UI1
smallint DT_I2
int DT_I4
bigint DT_I8
real DT_R4
float DT_R8
decimal DT_NUMERIC
numeric DT_NUMERIC
Datetime DT_DBTIMESTAMP
smalldatetime DT_DBTIMESTAMP
bit DT_BOOL
char DT_STR
varchar DT_STR
nchar DT_WSTR
nvarchar DT_WSTR
ntext DT_NTEXT
text DT_TEXT
uniqueidentifier DT_GUID
varbinary DT_BYTES
timestamp DT_BYTES
binary DT_BYTES
xml DT_WSTR
image DT_IMAGE
sql_Variant DT_WSTR
smallmoney DT_CY
money DT_CY

 

Regards

   

Rakesh Mishra

Like us on FaceBook Follow us on Twitter | Join the fastest growing SQL Server group on FaceBook

Follow me on TwitterFollow me on FaceBook

   

Leave a Reply

Your email address will not be published.