Decision Making In SSIS

  • I have a folder which contains excel files and I have successfully managed to read in the files using a foreach loop and populate a table.

    What I now need to do is to add a decision making process so I can either process just the files I want to process based on a flag in a table or to make it into a type of flowchart process, if name = 1 then this way else go that way.

    I've tried searching on ssis decision making but don't get anything useful, this might be asking something really basic that I haven't come accross.

    If anyone could point me in the right direction or even tell me which task I should look at that would be great.

    Thanks

  • Use an Execute SQL Task to read the list with filenames (from a table) and put the result set in a variable of type Object (you can already filter on a flag in the where clause of your query if you want).

    Next, use a Foreach Loop container to walk through the list.

    You can use precedence constraints to go one way or another based on an expression (click on the arrow and select Expression for Evaluation operation).

    If this is not enough to get you started, just let us know where you are stuck.

    Regards,

    Willem
    http://wschampheleer.wordpress.com[/url]

  • Thanks for this.

    So I could build an object with a list in, would it be posible to use a foreach loop to read the file name in a folder and then compare it to the list and if it's not there skip and go to the next?

    I'll have a look into the other information you gave me, thanks.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply