question

siera_gld avatar image
siera_gld asked

SSIS Merge Join - Replace Null Columns

I am using a merge join (1st time by the way...ugh)... I want a full outer join and when columns are null I am trying to replace the null column with the column that is joined from the two sources so that I can insert a non null record in my data table - this is the expression I am using in my Derived Column after the merge join transformation (DT_STR,6,1252)(ISNULL((DT_STR,6,1252)YR_MONTH) ? "" : ((DT_STR,6,1252)CR_YR_MONTH)) However, this still comes up with null values for the records that come from the CR source -
ssisderived-columnmerge-join
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Daniel Ross avatar image
Daniel Ross answered
I normally use a conditional split after the merge join, the use the ISNULL function to direct the rows to a DERIVED COLUMN transformation, the simply replace the column with the value you want. then after that, put a UNION ALL transformation in and connect from the conditional split and the derived column.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.