Using a variable to capture info from a Foreach Loop Container

  • Hello.

    I have a flow that includes a Foreach Loop Container that loads many files into a table. Also, the last task in the flow sends an "OK" email, and I want to include the list of files actually loaded by the FLC.

    In other words, I need to initialize a varOkList variable as an empty string, then populate it as varOkList=varOkList+varFilename+CRLF during the FLC, and finally include varOkList in the body of the email. I can do the last step, but I cannot figure out where or how must be done the other steps.

    I'm a newbie in SSIS. Any hint?

    Thank you!

  • sqlvitoco (4/30/2015)


    Hello.

    I have a flow that includes a Foreach Loop Container that loads many files into a table. Also, the last task in the flow sends an "OK" email, and I want to include the list of files actually loaded by the FLC.

    In other words, I need to initialize a varOkList variable as an empty string, then populate it as varOkList=varOkList+varFilename+CRLF during the FLC, and finally include varOkList in the body of the email. I can do the last step, but I cannot figure out where or how must be done the other steps.

    I'm a newbie in SSIS. Any hint?

    Thank you!

    A very simple solution would be to add a Script Task which reads the variable in every iteration and concatenates the value to another variable with a scope higher than the ForEach loop.

    😎

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

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