I have a query that I am putting through SSIS merge join (left join). It joins only on the columns specified in the ON. What do I do for it to consider other columns with AND?
SELECT Col1, Col2
FROM Table1
... many joins..
LEFT JOIN Table5 T5 ON T5.Col1 = T1.Col1
AND T5.Col2 = 'Y'
AND T5.Col3 = '1'
AND T5.Col4 <= T1.Col2
LEFT JOIN Table6 T6 ON T6.Col1 = T5.Col5
AND T6.Col2 LIKE '%DD%
Is this not possible to do with Merge-join? What are other ways that can be used to solve this? I could just put the whole query through a execute SQL but that's not what I am looking to do.