SSIS from theory to Combat to Application (4) Process Control for loop

Source: Internet
Author: User
Tags ssis

In the SSIS system, the control flow can often be encountered, such as you get a column of data, you need to loop the data and then do the appropriate operation, you need to use the loop, below, I will operate two loops, for loop and foreach Loop.

A, for loop

As you know, the usual writing for loops is this: for (var i = 0; i < i++) {//do sth;};

Here the bread contains three movements, the first to make the cycle, set the end of the cycle, cycle update values. Let's take a look at the corresponding action in the container for the loop.

Initexpression => Var i = 0

Evalexpression => I < 10

Assignexpression => i + +

In this comparison it is easy to understand the operation of the for container, we have to do such an operation, define a variable, each time let MessageBox pop-up such a value;

1, drag into the for container

2, add a @forloop int type variable in the variable window

3, follow figure 1 to operate the @forloop variable

4, add the Script task in the for window

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.