Answered by:
conditional split expression

Question
-
I'm using a conditional split.
What ever the value is for provider (null, 1, 0) it needs to compare it to dest_provider. It's working for 1 and 2, but not for nulls.
(ISNULL((DT_BOOL)Provider) ? (DT_BOOL)NULL : (DT_BOOL)Provider) != (ISNULL((DT_BOOL)Dest_Provider) ? (DT_BOOL)NULL : (DT_BOOL)Dest_Provider)
LISA86
Thursday, May 5, 2016 9:01 PM
Answers
-
- Proposed as answer by Seif Wang Thursday, May 12, 2016 10:14 AM
- Marked as answer by Eric__Zhang Sunday, June 12, 2016 10:47 AM
Friday, May 6, 2016 8:42 PM
All replies
-
Friday, May 6, 2016 2:02 AM
-
Hi LISA86,
Based on your description, I did some research, but I couldn’t understand why you convert Provider to Boolean in expression?
Could you post some details information about what results do you want to get in your destination with conditional split and whether the dest_provider and provider is in the same table? Then we could help you to achieve it better.
Regards,
Seif
- Edited by Seif_Wang Monday, May 9, 2016 1:28 AM na
Friday, May 6, 2016 6:53 AM -
I'm trying to do this
if the source column is null then make it null if not make it the same column
Have to do it with a varchar and a Boolean data type
((
ISNULL(RS_NAME)? NULL(DT_WSTR,2):RS_NAME)!=(ISNULL(Dest_RS_NAME)? NULL(DT_WSTR,2):Dest_RS_NAME))
(ISNULL((DT_BOOL)Provider) ? (DT_BOOL)NULL : (DT_BOOL)Provider) != (ISNULL((DT_BOOL)Dest_Provider) ? (DT_BOOL)NULL : (DT_BOOL)Dest_Provider)
LISA86
Friday, May 6, 2016 8:33 PM -
- Proposed as answer by Seif Wang Thursday, May 12, 2016 10:14 AM
- Marked as answer by Eric__Zhang Sunday, June 12, 2016 10:47 AM
Friday, May 6, 2016 8:42 PM -
yes it's db null, in source tbl it's null in destionation tbl it's not, I want to make it a null. I want whatever is in the source tbl to be in destionation tbl. The syntax I have is not working.
((
ISNULL(RS_NAME)? NULL(DT_WSTR,2):RS_NAME)!=(ISNULL(Dest_RS_NAME)? NULL(DT_WSTR,2):Dest_RS_NAME))
(ISNULL((DT_BOOL)Provider) ? (DT_BOOL)NULL : (DT_BOOL)Provider) != (ISNULL((DT_BOOL)Dest_Provider) ? (DT_BOOL)NULL : (DT_BOOL)Dest_Provider)
LISA86
Friday, May 6, 2016 8:48 PM