Problem Dynamically Assigning Message Text Using a Query

  • I have a DTS package in which I'm using the Dynamic Properties Task to assign the MessageText of a SendMail Task with a Query.  The Query pulls the top 12 * from a log table that has 5 columns where a certain text field ='blah blah some text'

    When I get my email from the SendMail task.  I don't see my 12 rows of data by 5 columns as I expect but instead see only 'blah blah some text' (w/o the quotes) as my Message Text.

    Any ideas?  Anyone done this successfully?  Thanks, Crux9

     

    Additional info:

    The dynamic properties task can be used to dynamically assign properties of other tasks.  One of the sources for that assignment can be a query.  The property I am trying to dynamically assign is the MessageText property for a SendMail task that ideally will send me recent history from the log file for this process.  I can then judge, based on recent history, whether the process "behaved" or if I need to spend more time with it. hth

  • I don't entirely understand what it is you are doing.

    Are you bringing the results from the dts task into a global variable used for the message?

    If you are doing this. make sure the variable is a type big enough to handle the amount of text being sent to it.

     

     


    ------------------------------
    The Users are always right - when I'm not wrong!

  • When you assign a property through a dynamic properties task, the query you create must return only one value.  It it returns a result set, only the value of the first column-first row will be assigned to that property.  I would suggest you create another execute sql task that concatenates all the columns/rows into a single global variable and assign that global in the dynamic properties task.

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

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