Newbie Q.. SSIS and emailing several variables..

  • I'm just doing a rowcount of a table before I delete it, and then a rowcount of the table after I make a series of inserts to the table. The rowcounts are just sql tasks that get stored into two separate variables.

    When I create a send email task, (direct source) I try typing something like..

    Rows Deleted = @[User::Variable1]

    Rows Added = @[User::Variable2]

    What I get back is exactly what I typed.. how do I get the values of these variables (both are integers) to show up in a send email task, and not the variable names?

    I'm rather new to SSIS so I'm assuming I'm just missing something simple..

    Thanks!! 😀

  • Are you adding this directly to the MessageSource field? If so, the variables will not be evaluated but treated as literals. What you'll need to do is use an Expression instead, and dynamically build your output something like:

    "Rows Deleted = " + @[User::Variable1] + "; Rows Added = " + @[User::Variable2] + "."

    You'll do this in the Expression field for the MessageSource value.

    Let me know if this isn't clear.

    hth,

    Tim

  • Thanks so much! I knew I was missing something simple, but I've never done that before.. Thanks! 🙂

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

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