 Hello friends, welcome to SSUnity. So, see this site and this is continuation of SSIS tutorial. So, today we gonna discuss about merge join transformation. So, this is very important transformation where we can apply our SQL joins that is inner join, outer joins. So, let's start with merge join transformation. The merge join transformation provides an output that is generated by two sorted datasets using full left or inner joins. So, what is the input requirements? The merge join transformation requires sorted data for its input. Here we can see we have two OLEDB sources, then we have to use sort transformation to sort our OLEDB source data, then I wanna use merge join transformation, then I'll apply inner join between these two datasets and provide that output. So, before going forward let's have a look of OLEDB sources. So, as we can see we have sale order header table and sale order detail table. So, this table contains the sale order number, sale order date and many more information. In our detail as we can see we have sale order number, item code, variant, quantity, and value. So, we are getting all these values. So, we can see sale number is common between these two tables. So, we can apply join by using sale order number. So, go to SSGT. So, here I wanna add one more package. So, right click on this SSIS package, then new SSIS package. Here, I wanna rename this package by merge join. So, this is our merge join. Then we need to drag and drop dataflow task. Now, double click on this dataflow task. So, here we need to use our source transformation and destination. As we have discussed, we have two OLEDB sources. I have drag and drop these two OLEDB sources. Now, I wanna double click on this OLEDB source, click on new. Then we have already made the connection. So, click on OK. Here, we need to select the table. As we have discussed, we have sale order header table and sale order detail table. So, I gonna use sale order header table for this. And in our second OLEDB source, we gonna use for sale order detail table. So, this is our sale order detail. Go to on columns. Then click on OK. And here we can rename this by header and detail. This is for detail. Now, we need to use sort transformation because merge and merge join transformation only accept the sorted data. So, here we need to drag and drop sort transformation. This is for header and this is for detail. Now, we need to connect with header and then detail. Now, double click on this sort transformation. So, here we gonna sort by sale order number. So, we can select and click on OK. In our detail, again we gonna sort by the order number. Then click on OK. So, we have done our sort transformation. Now, we need to configure our merge join transformation. So, I gonna drag and drop this merge join transformation and then connect with sort transformation. So, here we can see it would accept left input and right input. So, I gonna use left input at this time. Then click on OK. Then this is our right input. Now, we need to double click on this merge join transformation. Here we can see join types. So, it would accept inner join, left outer join and full outer join. So, in case of inner join, our swipe input button is disabled. When we move to full join, then it's also disabled. When we have option for left outer join, then it's enabled. Because if we want to use right join, then we can simply swipe our inputs to get the right join. So, at this time I wanna use inner join. We want all the columns from error table. And in our detail table, we want item code, variant quantity and value. We don't want sell order number from detail table. So, now click on OK. So, we have done our merge join transformation. As we can see it doesn't have any error output. I gonna load this data in flat file. So, we need to drag and drop flat file destination. Then connect with merge join transformation. Double click on this flat file destination. Here we need to select flat file connection manager. So, we don't have any connection manager right now. So, click on new. So, it would ask that file format. So, I gonna use delimited format. So, click on OK. So, here it would ask for file path. So, we can browse. So, here we want to generate our output with merge join output. Then click on open. And column names in the first data row. So, we need to select this check box. Go to on columns. So, here we can see we are having all the columns. And it would generate a comma delimited file. Now click on OK. Now, go to on mapping. As we can see mapping succeed. So, click on OK. So, we have done our package. Now we can save this package and click on start. As we can see 36 rows should be inserted in our flat file destination. Now we can stop this package to go to on flat file. So, we need to open this file. As we can see we are getting all the values. So, here we can see it doesn't provide any error output. As we have seen it accepts only two inputs. So, these are the limitations for merge join. So, thank you so much for watching this video. If you like this video, please subscribe our channel to get many more videos. And don't forget to press the bell icon to get the notification of our newly uploaded videos. Thank you so much.