SSIS Conditional Split boolean result

Echo picture Echo · Aug 23, 2012 · Viewed 12.8k times · Source

In conditional split component, I need to know if Age equals -1 and am using following statement. enter image description here

However, there comes errors when running. How should I modify my statement? Thx a loooooooot!!

Error: The expression "Age == -1" on "output "Unknown" (12743)" evaluated to NULL, but the "component "Age Conditional Split 1" (12740)" requires a Boolean results. Modify the error row disposition on the output to treat this result as False (Ignore Failure) or to redirect this row to the error output (Redirect Row).  The expression results must be Boolean for a Conditional Split.  A NULL expression result is an error.

Answer

SQLMD picture SQLMD · Aug 23, 2012

I am guessing that you have some NULL values for age. If you want to send NULL's to the same Unknown Output then you could change the expressions to be:

ISNULL(Age) || Age == -1