SQL Server BI step with step SSIS 4

Source: Internet
Author: User
Tags ssis

This article supporting source code

We have implemented the import of data from Excel into the data flow target. That's the database, but we just simulate the data that's not duplicated, which is the data that doesn't exist at this time in the database. Then, if the data in Excel is the same as the primary key of the data in the database, Then insert operation will be an exception, how to implement automatic Update operation? That is, automatically determine the data source data, if the database exists on the implementation of the update, does not exist on the insert?

It may be misleading to call it merging data, and there is a difference between the combined data and the direct implementation of the merge and merge join components in the data stream, and first we look at the two components.

We create a new package, coincident with the name Mergedata, and then copy the components from the last Foreachinput package (including the Connection manager) in the control flow, delete the Foreach Loop container, and then modify the data flow to add two Excel data stream sources, respectively It is sorted by sort (according to the ProductNumber field), then the merge is added for data merging, three data viewers are added separately, and the modified flow diagram is as follows:

Let's do this, the parts of the three data viewer are shown below:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.