MERGE Transformation in SSIS with Example



In this post we are gonna discuss about MERGE transformation. MERGE in SSIS is equal to UNION ALL in SQL Server. This transformation unions two datasets/tables.The merge Transformation combines two sorted dataset into single dataset. Highlighted the text SORTED in last statement because “It is not possible to use MERGE when the inputs are NOT SORTED”. There is one more transformation which is very similar to this i.e UNION ALL. The Merge Transformation is similar to the union all transformations. Use the union all transformation instead of the merge transformation in the following situations.

  • The transformation inputs are not sorted
  • The combined output does not need to be sorted.
  • The transformation has more than two inputs.
MERGE takes ONLY TWO inputs where as UNION ALL can take more than two. Now lets see how to configure MERGE transformation with an example.
I created TWO tables with names MergeA and MergeB and inserted few records into each table as shown below.
  • Open a new project and drag a Data Flow task from toolbox in Control Flow.
  • Edit the Data Flow task by double clicking the object or by selecting EDIT button on Right click on the object. Make sure the Data Flow Page is opened as shown below.

  • Select TWO OLE DB data sources from data flow sources and drag and drop it in the data flow.
  • Double click on the OLE DB data source to open a new window where we can set the properties of the connection.
  • Select the connection manager and click on new button to set the connection string to the TWO tables as shown below.
  • Set the connecteions to the TWO tables created using TWO OLE DB data sources.
  • As said earlier, we need to SORT the data before giving as input to the MERGE transformation and hence drag and drop TWO SORT transformations into Data Flow pane and provide output of each OLE DB source to each Sort transformation as shown below.
  • Open the SORT configuration and select the Checkbox as EmpNo which means the SORT will happen on EmoNo column a s shown below and apply the same in both the SORT transformations. Also provide sort type as either Ascending or Descending as per your requirement.
  • The Input data from both the sources is SORTED now and hence add MERGE transformation to the pane and provide OUTPUT of both sort transformations as input to MERGE transformation as shown below.
  • Now drag and drop Flat File Destination to see the output on file, make connection between the Merge and the Flat File Destination as shown above.
  • Double click on the Flat File Destination to configure, In CONNECTION MANAGER select the NEW Option to set file path of the file and Click OK. If you select a file which already Exists then it will take that file else a NEW file will be created.
  • Check the mappings between Available Input Columns and Available Destination Columns and click OK.
  • Now the Package is ready which pulls the data from TWO tables then sorts and then mergers the data that is coming from two sources before copying to destination file. Trigger the packages and make sure all turns to GREEN.
  • Now open the file and see the data copied into the file which is coming from TWO sources.
In the above example I have taken OLE DB sources and Flat file destination to explain MERGE transformation. You can use any SOURCE and DESTINATION types depending on your requirements. The key things to keep in mind while using MERGE transformation –
  • Same number of columns should be there in both the sources.
  • Same data types should be present for mapping columns.
  • Data should be sorted before giving as input to MERGE.
That’s it .. as simple as this .. Try and Enjoy .. 🙂


Roopesh Babu V



  1. Play free slot games online not for fun only but for real money rewards too. Most free casino slots for fun are colorful and visually appealing, so about 20% of players play for fun and then for real money. The best free online slots are exciting as they’re entirely risk-free. Enjoy basic 3-reeled titles or complicated new modern versions for your taste: Enjoy our growing list of free slots to play for fun with no download or registration required. We’ve selected some of the most popular slots that you can find at most online and brick-and-mortar casinos so you can get real experience of playing authentic casino slots at your finger tips for free. Here at we rate the best free slots games, and offer a selection of unbeatable free online slot machines for you to play right now – just take a look through our games list. Once you find one that takes your fancy, you could be up and running within minutes.
    There really aren’t any mobile casinos better than BetMGM. The range of BetMGM casino games is among the best, and the layout is immaculate. Any online casino lover’s first concern is to find their favorite game in an online casino. So, it is also our first care to evaluate iPhone and Android casino apps and the range of games they offer. Though every mobile casino app includes slot games, the number of their offering could vary from a few dozen to hundreds. If you love to play slots, you should consider Ignition or Las Atlantis, which extend a huge range of classic, video, and jackpot slot games. Meanwhile, you can access a “Download” casino using an app that you download from the casino site or the app store of your choice. Specific casinos pride themselves on their real mobile-friendly casino, such as Jackpot Village casino, which has crowned itself the best mobile casino and has the awards to prove it. Naturally, some people will wonder why it’s even necessary to download casino software. Especially when so many platforms provide their games in an instant-play scenario today. Well, there are some benefits to downloading the software as an alternative, including their welcome bonus and free spins.

  2. Haemaphysalis longicornis ticks are vectors for severe fever with thrombocytopenia syndrome, associated a high mortality rate in China, South Korea and Japan buy priligy Their study suggested that the amount of prognostic information contained in these IHC4 assays is similar to that in the Genomic Health RS in early breast cancer

  3. [url=]cost of cheap propecia tablets[/url] cost propecia without prescription

  4. amoxicillin 500mg prescription: [url=]amoxicillin price without insurance[/url] amoxicillin 500 coupon

  5. how much does ivermectin cost [url=]ivermectin 3 mg tabs[/url] ivermectin 2%

  6. Free spin multipliers can create winning Slot Games combinations worth a maximum of 10,500x your total wager, online pokies android and as a result. There will of course always be the very real chance that you could and up winning a life changing jackpot win if you decide to set about playing progressive pokies, any revenue. In terms of search, courtesy of a partnership. App for playing casino pokies for money for android not every casino site offers low wagering bonuses, take advantage of the generous promotional portfolio which goes well beyond the massive welcome package. One of the worst strategies is placing proposition bets on every single roll of the dice as this is a certain and fast way to lose their bankroll, check out the A Pirates Quest slot. Deposits made via other methods such as PayPal, they wont have a remote gambling licence from the UKGC.
    Kaspersky Kurumsal Ürünlerden Sorumlu Başkan Yardımcısı Ivan Vassunov: – “Kaspersky Endpoint Security for Business’ın özellikle müşterilerimizden gelen derecelendirmelerle, Endpoint Security’de lider… >>Play at Genesis Casino Kaspersky Kurumsal Ürünlerden Sorumlu Başkan Yardımcısı Ivan Vassunov: – “Kaspersky Endpoint Security for Business’ın özellikle müşterilerimizden gelen derecelendirmelerle, Endpoint Security’de lider… If you like Genesis Casino, we suggest to discover sister-casinos from Genesis. You may expect similar quality of games, design and features. Ongoing Deposit Bonuses: 50% on 2nd deposit up to $300. Also, 25% up to $300 on the 3rd and 4th deposits. The minimum deposit for each bonus is $10, 40x wagering requirements. These payment options are excluded from receiving this bonus Skrill and Neteller. T&C.

  7. Когда мне срочно потребовалось 30 000 рублей на оплату обучения, я узнал о через VK. На сайте я нашел подборку официальных МФО и статьи о том, как правильно брать [url=]займы на карту[/url] . Был удивлен, что некоторые МФО предоставляют займы без процентов!

  8. Добро пожаловать в мир удивительных путешествий, где каждый отель – это не просто место для ночлега, а особенное пространство, создающее неповторимую атмосферу отдыха. Мы знаем, как важно выбрать идеальный отель в Туапсе, который удовлетворит все ваши потребности и желания. В нашем ассортименте – лучшие отели, способные превратить ваш отдых в настоящее волшебство!

    Наши специалисты проанализировали все отели в Туапсе, чтобы предложить вам только лучшее. Наслаждайтесь комфортом и качеством услуг, выбирая отели с прекрасными видами, современными удобствами и высококлассным сервисом. Мы учтем все ваши пожелания: от местоположения и до дополнительных услуг.

    Туапсе – город, где каждый найдет что-то особенное для себя. Любители активного отдыха оценят близость к горным тропам и паркам, ценители культуры – многочисленные музеи и галереи, а гурманы в восторге от местной кухни, представленной в ресторанах отелей.

  9. can you buy zithromax over the counter in australia [url=]azithromycin 500 mg buy online[/url] zithromax 250

  10. top erection pills [url=]Over the counter ED pills[/url] natural ed medications

  11. zithromax prescription online [url=]buy zithromax[/url] can i buy zithromax online

  12. п»їcanadian pharmacy online [url=]canadian pharmacy meds[/url] ordering drugs from canada

  13. world pharmacy india [url=]buy medicines from India[/url] online pharmacy india

  14. Захотелось новых ощущений и я решил попробовать поиграть в онлайн казино. Сайт стал моим проводником в этот мир. Теперь у меня есть список популярных казино и тех, где можно получить бонус на первый депозит.

  15. As CAKE is infinitely divisible, it is possible to purchase just a fraction of the currency. Nexo allows you to buy as little as $1 worth of CAKE. This is a hard question to answer. Mostly because it’s like comparing pears to oranges. Both PancakeSwap and Uniswap are great decentralized exchanges, but they exist on different chains. PancakeSwap is the best choice for users who already have BEP-20 tokens and are eager to keep their activities on Binance Smart Chain. While Uniswap is the better choice if you’re looking to transact and keep your activities restricted to the Ethereum blockchain. Though, I’d like to point out that PancakeSwap currently offers more financial products on its interface than Uniswap currently does. Conversely, Uniswap has twice the liquidity that PancakeSwap currently has, this should change with the growing popularity of the BSC network.és
    Bitcoin is a currency of Digital Currency.The sign of Bitcoin is ¤, ISO code is BTC.Bitcoin is sibdivided into 1000 mBTC.BTC exchange rate was last updated on August 18, 2023 13:30:01 UTC. ETHER EURO FUTURES: EFFICIENTLY CAPTURE ETHER EURO EXPOSURE A week after its first block was launched on January 3rd, 2009, the first test transaction took place. In 2011, coders and miners started to build other networks such as Litecoin and Ethereum and vegan improving the code behind the blockchain of Bitcoin. By doing this, they adapted it for different uses. The increase in the perceived value of Bitcoin came partly as a result of the wider base of applications that brought in more individuals. In the midst of the collapse of multiple fiat currencies worldwide, the cryptocurrency market seems to be going strong, leading investors to turn their gaze to digital assets like Bitcoin (BTC) and Ethereum (ETH) instead.

  16. Generic Cialis price [url=]Buy Tadalafil 10mg[/url] Generic Cialis without a doctor prescription

  17. Levitra 10 mg best price [url=]buy Levitra over the counter[/url] Buy Vardenafil 20mg online

  18. my canadian pharmacy reviews: vipps canadian pharmacy – onlinecanadianpharmacy 24
    legit canadian pharmacy [url=]canadian pharmacy drugs online[/url] canadian pharmacy 1 internet online drugstore

  19. mexico drug stores pharmacies: buying from online mexican pharmacy – mexican pharmaceuticals online
    medicine in mexico pharmacies [url=]medicine in mexico pharmacies[/url] reputable mexican pharmacies online

  20. legit canadian pharmacy online: escrow pharmacy canada – drugs from canada
    buy medicines online in india [url=]cheapest online pharmacy india[/url] buy prescription drugs from india

  21. order amoxicillin 500mg [url=]amoxicillin 1000 mg capsule[/url] generic amoxicillin 500mg

  22. zithromax over the counter canada [url=]buy zithromax canada[/url] zithromax cost australia

  23. generic zithromax online paypal [url=]zithromax antibiotic without prescription[/url] zithromax for sale 500 mg

  24. how much is doxycycline [url=]doxycycline buy online[/url] doxycycline medication pills

  25. buy cipro online without prescription [url=]ciprofloxacin order online[/url] ciprofloxacin 500 mg tablet price

  26. farmacie on line spedizione gratuita [url=]farmacie on line spedizione gratuita[/url] farmacie online autorizzate elenco

  27. viagra online consegna rapida [url=]viagra online spedizione gratuita[/url] viagra online spedizione gratuita

  28. farmacie online sicure [url=]farmacia online migliore[/url] п»їfarmacia online migliore

  29. viagra consegna in 24 ore pagamento alla consegna [url=]viagra prezzo farmacia[/url] dove acquistare viagra in modo sicuro

  30. farmacia online internacional [url=]Levitra sin receta[/url] farmacias baratas online envГ­o gratis

  31. farmacia gibraltar online viagra [url=]sildenafilo precio[/url] sildenafilo 100mg precio espaГ±a

  32. farmacias online seguras [url=]se puede comprar kamagra en farmacias[/url] farmacias online baratas

  33. farmacia online envГ­o gratis [url=]comprar kamagra en espana[/url] farmacia online madrid

  34. farmacia online envГ­o gratis [url=]farmacia online envio gratis[/url] farmacias online seguras en espaГ±a

  35. п»їpharmacie en ligne [url=]Levitra sans ordonnance 24h[/url] Pharmacie en ligne livraison rapide

  36. online-apotheken [url=]online apotheke deutschland[/url] online apotheke gГјnstig

  37. buying prescription drugs in mexico [url=]mexican mail order pharmacies[/url] mexico drug stores pharmacies

  38. mexico drug stores pharmacies [url=]mexican pharmaceuticals online[/url] medication from mexico pharmacy

  39. mexican pharmaceuticals online [url=]pharmacies in mexico that ship to usa[/url] mexico drug stores pharmacies

  40. pharmacy rx world canada [url=]canadian pharmacy victoza[/url] canadianpharmacymeds com

  41. best canadian pharmacy online [url=]cross border pharmacy canada[/url] canadian pharmacy world reviews

  42. ed medications list [url=]erection pills that work[/url] pills for erection

  43. pharmacy website india [url=]best india pharmacy[/url] india pharmacy mail order

  44. canadian pharmacy no scripts [url=]pharmacy rx world canada[/url] canadian discount pharmacy

  45. canadian pharmacy drugs online [url=]pharmacy canadian superstore[/url] buying from canadian pharmacies

  46. buy cipro online without prescription [url=]antibiotics cipro[/url] ciprofloxacin over the counter

  47. buy cipro cheap [url=]where can i buy cipro online[/url] where can i buy cipro online

  48. zithromax 500 mg [url=]how to get zithromax[/url] purchase zithromax z-pak

  49. buy doxycycline [url=]doxycycline monohydrate[/url] purchase doxycycline online

  50. online canadian pharmacy [url=]Cheapest drug prices Canada[/url] buying drugs from canada

  51. canada drugs reviews [url=]Cheapest drug prices Canada[/url] buying drugs from canada

  52. buy propecia tablets [url=]Finasteride buy online[/url] cost propecia without prescription

  53. zestril 20 mg price canadian pharmacy [url=]over the counter lisinopril[/url] lisinopril 20 mg canadian pharmacy

  54. farmacia online migliore [url=]avanafil generico prezzo[/url] farmacia online miglior prezzo

  55. viagra cosa serve [url=]viagra senza ricetta[/url] miglior sito per comprare viagra online

  56. Просто решил порадовать свою девушку без повода. Заказал букет на “Цветов.ру” с доставкой на ее работу. Увидев цветы, она была в восторге. Очень доволен выбором сервиса и качеством обслуживания. Советую! Вот ссылка [url=]цветов ру[/url]

  57. buying prescription drugs in mexico [url=]reputable mexican pharmacies online[/url] buying prescription drugs in mexico

  58. buying from online mexican pharmacy [url=]mexican mail order pharmacies[/url] purple pharmacy mexico price list

  59. how to get generic clomid no prescription [url=]how to buy generic clomid no prescription[/url] can i get generic clomid price

  60. non prescription erection pills [url=]buy prescription drugs without doctor[/url] ed prescription drugs

  61. [url=]my canadian pharmacy rx[/url] canadian pharmacies without an rx

  62. prescription drugs without doctor approval [url=]sildenafil without a doctor’s prescription[/url] generic viagra without a doctor prescription

  63. aarp recommended canadian online pharmacies [url=]canadian rx pharmacy online[/url] prescription drugs canadian

  64. online meds [url=]aarp approved canadian online pharmacies[/url] mexican drug pharmacy

  65. best mail order pharmacy canada [url=]Canadian pharmacy online[/url] canadian pharmacy meds review

  66. indian pharmacy paypal [url=]indian pharmacy to usa[/url] indian pharmacy

  67. pharmacy canadian [url=]Cheapest drug prices Canada[/url] canadian pharmacy online

  68. the canadian drugstore [url=]Canada Pharmacy[/url] is canadian pharmacy legit

  69. canadianpharmacymeds [url=]Canada Pharmacy[/url] best rated canadian pharmacy

  70. canada rx pharmacy world [url=]Canada Pharmacy[/url] canada pharmacy world

  71. www canadianonlinepharmacy [url=]Canadian pharmacy online[/url] reliable canadian pharmacy

  72. canadian drug pharmacy [url=]Cheapest drug prices Canada[/url] cross border pharmacy canada

  73. Pharmacie en ligne sans ordonnance [url=]pharmacie en ligne[/url] Pharmacie en ligne livraison gratuite