you're reading...
SQL Server

SSIS–If Then Else Expression

Ever wondered how to perform an If Then Else operation in an SSIS Expression, well today is your lucky day. The syntax for SSIS expressions is a little different then most other Microsoft development tools. The basic syntax is as follows:

(Condition ? True Value : False Value)

Basic If Then Else:

([Gender] == “F” ? “Yes”:”No”)

OR Condition:

([Gender]==”F” ||  [MaritalStatus]==”S” ? “Yes”:”No”)

AND Condition:

([Gender]==”F” &&  [MaritalStatus]==”S” ? “Yes”:”No”)

Not Equal Condition:

([Gender] != “F” ? “Yes”:”No”)

Nested If Then Else Statements:

(ISNULL(Operations) ? (ISNULL(Consolidated) ? RIGHT(Personnel,5) : RIGHT(Consolidated,5)) : RIGHT(Operations,5))




About ldgaller

Accomplished Data Warehouse Architect, DBA and Software Architect with over 15 years of professional experience and demonstrated success designing and implementing solutions that improve business functionality and productivity. Highly diverse technical background with proven ability to design, develop and implement technology on an enterprise level. I approach all projects with passion, diligence, integrity, and exceptional aptitude.


No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: