How to Send Tabular Data into mail body???

  • I just want to send an output of a table (data in tabular form) through mail (in body).

    Can anyone help me, how it is possible in SSIS???

    Sanju

  • I have achieved the same using cursor. But sure of course there might be an easier way.

    ----------------------------------------------------------------------------------------------------------------------------------------------------
    Roshan Joe

    Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • I have done this recently. The way I did it was to use a execute sql task. in this task I buillt a sql variable of all I wanted the email to contain (you can just select all your data into the variable). Be careful here as the biggest string variable you can have is 8000 characters so make sure you'll need less than that.

    Once you've built the sql variable simply select it at the end of the sql statement and use the "Results set" item from the Execute sql task to map the output to an SSIS user defined variable.

    Then simply set the message source type property to variable and the message source to your ssis variable. Job done! 🙂

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

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