Search code examples
visual-studio-2015ssissql-server-data-tools

How to use SSIS Merge Join - not working as expected


I'm trying to reproduce in SSIS a simple inner join:

select *
from journee jou
inner join journee_elp jep on jep.journee_fk = jou.id

So I did in SSIS:

enter image description here

enter image description here

Both source have IsSorted set to True, and the joined columns have SortKeyPosition = 1

For the 1st test, I add the where on both of the source to restrict the perimeter (the SQL statement returns 19 lines for this test) :

enter image description here

This is the behaviour I was expecting, glad of this success, I decided to remove the WHERE from the left source...

But no more matching...

enter image description here

Did I missed something? I'm using VS 2015.


Solution

  • I needed to add an order by on the key in addition to the SortKeyPosition = 1 and it worked