none
Merge Join does not work as expected in SSIS

    Dotaz

  • I am  performing merge join on two tables A and B

    A has 9504 rows and B has 13238 rows

    There are common 9502 rows to A nd B

    when I perform the select distinct col1 join A and B on A.col1=B.col1 in SSMS provides me 9502 rows

    when I do the same using merge join in SSIS it gives 517 rows,

    I made sure that Datatype is same for both tables and Issorted is set to True.

    Can someone help please?

    Thanks in advance!

    čtvrtek 14. června 2018 20:05

Odpovědi

  • My guess is that you may have the values in different cases in both the tables.

    SSIS being case sensitive the values have to be of the same case if you want Merge Join to return the matches. In case they're of different case use UPPER to convert all of them to upper case on both sides and then give them as inputs to Merge Join.

    Also SSIS considers trailing spaces too so in case if your value has spaces make sure you apply RTRIM before you do the comparison



    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    ----------------------------
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page


    • Upravený Visakh16MVP čtvrtek 14. června 2018 20:37
    • Označen jako odpověď PEL1 pátek 15. června 2018 13:41
    čtvrtek 14. června 2018 20:36

Všechny reakce