Home Forums Data Warehousing Integration Services Full Outer Merge Join, selecting value from one side in preference RE: Full Outer Merge Join, selecting value from one side in preference

  • FunkyDexter (2/8/2016)


    Hi

    I'm using SSIS 2008 R2. I have two datasets on which I want to do a full outer join based on a match string, no problem there, I've set up a Merge Join. Where a match is found I want to output a non key field from DataSet A if there is one, or the corresponding field in DataSet B if the value is null in DataSet A.

    Basically, I'm looking for the SSIS equivalent of something like this:-

    Select isnull(T1.Field1, T2.Field2)

    From Table1 T1

    Full Outer Join Table2 T2

    on T1.KeyField = T2.KeyField

    At present I'm including the columns from both sides of the join and then using a subsequent Derived Column task to coerce them into single values. This feels a bit unwieldy, though, and I can't help thinking I'm missing something obvious.

    If you want to keep this matching process wholly within SSIS, it sounds like you're doing the right thing. If performance is an issue, you might want to consider re-architecting the solution such that the join is done in T-SQL.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.