elucero
asked on
ssis expression with isnull?
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 types
this is what I have but not working thanks
((ISNULL(RS_NAME)? NULL(DT_WSTR,2):RS_NAME)!= (ISNULL(De st_RS_NAME )? NULL(DT_WSTR,2):Dest_RS_NA ME))
(ISNULL((DT_BOOL)Provider) ? (DT_BOOL)NULL : (DT_BOOL)Provider) != (ISNULL((DT_BOOL)Dest_Prov ider) ? (DT_BOOL)NULL : (DT_BOOL)Dest_Provider)
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 types
this is what I have but not working thanks
((ISNULL(RS_NAME)? NULL(DT_WSTR,2):RS_NAME)!=
(ISNULL((DT_BOOL)Provider)
ASKER
How do I put this in a conditional split?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SET Dest_RS_NAME = COALESCE(RS_NAME, NULL)
Basically, all this does is set Dest_RS_NAME to the first non-null value in the list of COALESCE arguments. The trick here is that the last argument in COALESCE is, itself, NULL. If COALESCE runs off the end of the arg list without finding a non-null value it returns a null. So...
If RS_NAME is NULL then COALESCE will return the 2nd argument which is also NULL. If RS_NAME is not NULL then COALESCE will return whatever the value if RS_NAME is. The data type will match.