May 3, 2016 at 9:37 am
I've to find difference between 2 excel columns in SSIS, The data type is DT_WSTR, so I tried converting data type using the Data Conversion transformation editor - Changed it to DT_[2]. In Conditional Split I used this formula
(([Copy of F21] - [Copy of F18]) > 0.17)
It gave me this error. "The expression "([Copy of F21] - [Copy of F18]) > 0.17" on "output "Case 1" (720)" evaluated to NULL, but the "component "Conditional Split" (612)" 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."
Where is it going wrong? Any help please?
May 3, 2016 at 9:53 am
You likely have a NULL value in one of your two fields in your expression. Try to use the REPLACENULL() function on both of your columns to set the value to zero when the field is NULL.
May 3, 2016 at 10:09 am
Sorry for my ignorance but I did not find ReplaceNull() function. I tried this in COnidtional SPlit
ISNULL(([Copy of F21] - [Copy of F18]) > 0.17)
, The results are only Null values:
F18F19F20F21
NULLNULLNULLNULL
NULLNULLNULLNULL
NULLNULLNULLNULL
NULLNULLNULLNULL
NULLNULLNULLNULL
May 3, 2016 at 10:28 am
ReplaceNull() function usage based on your current example expression:
REPLACENULL([Copy of F21], 0.00) - REPLACENULL([Copy of F18], 0.00) > 0.17
May 3, 2016 at 10:53 am
I'm using Sql Server 2008, that's the reason i cant find this REPLACENULL() function. I see this function in SSIS 2012 but i dont think i can deploy 2012 SSIS packages in Sql Server 2008.
May 3, 2016 at 11:05 am
OK, then we'll need to use a conditional check for ISNULL on each column...
(ISNULL([Copy of F21]) ? 0 : [Copy of F21]) - (ISNULL([Copy of F18]) ? 0 : [Copy of F18]) > 0.17
May 3, 2016 at 11:14 am
Thank you so much....that worked!!!
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply