posted 2/22/2012 by ShawnHarrison - Views: [1114]
One question I hear a lot when teaching or speaking about SSIS is ?How can I write an If, Then, Else statement?. In most cases, the expression language isn?t very intuitive, but If Then Else is quick and easy. Here is a examples of how to do this.
Let?s say I am looking at NULL values that I want to replace with something else. The expression I use would look like this.
The ?IF? section is looking for NULL values. It?s basically saying ?IF Color is NULL?. The question mark represents ?THEN? and the colon represents ?ELSE?. This expression is saying If color is NULL, then the value will be changed to ?Unknown?, else the value will remain what is currently in the color field.