FOREACH ADO Enumerator and SSIS

Posted on 2007-07-20
Last Modified: 2013-11-30
In SSIS, if I want to loop through a table, pulling out one column in that table based on certain criteria, how do I loop through each returned row?  I beleive it is the FOREACH ADO enumerator, but I can't find a simple example on how to put one together.  More importantly, how to build the dataset within the FOR EACH loop.  If someone could point me to, or give me an example of how to set up a simple FOREACH loop that takes a query from a table, returns one column, and runs a query on each row return from that column, I would be grateful.
Question by:martindoll
    LVL 1

    Accepted Solution

    I found this to be extremely useful to understand how the ADO enumerator works:
    I was able to make my code work after lookign through this example.

    Author Comment

    Perfect.  Exactly what I was looking for.  Thanks for your help!!!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
    In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
    Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
    Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now