Use the result set from the Execute SQL Task as the body text in an email.

  • I have a very simple SSIS package as follows:

    1)Execute SQL Task – Run SQL to return the count of a process

    2)If the count > 0

    3)Execute SQL Task – Run SQL to return a result set of process id’s

    4)Mail the result set in the body of an email

    I receive the email, but it does not include the result set, only the first row.

    How can I get it to return the entire result set in the email body text?

    Please note – I do not have any access to .Net functionality so it has to be done using available components in SSIS.

    Thanks in advance,

    Claire

  • There was an excellent article written on this very site about sending query results in email using xml.

    Email Article[/url]

    Kindest Regards,

    Frank Bazan

  • Why not make an SSRS report with a data driven subscription?


    Cheers,

    Ben Sullins
    bensullins.com
    Beer is my primary key...

  • Frank,

    Thanks for the link to the atricle.

    I did see the article earlier, but did not want to use xml.

    After tearing my hair out (as I know I did it without using xml in my last job) I gave in and did it that way instead.

    At least it now works 🙂

    Thanks again,

    Claire

  • Ben,

    Thanks for your suggestion. I may try that for a bit of fun when I get a quiet moment.

    Claire

  • Ben Sullins (5/21/2008)


    Why not make an SSRS report with a data driven subscription?

    Ben,

    Please let me know any article you may have to do this. Thx much.

  • If you are familiar with SSRS...

    http://technet.microsoft.com/en-us/library/ms156012.aspx

    If you are not, first get acquainted and build the simple report, then use the above link to create the data-driven subscription...

    http://technet.microsoft.com/en-us/library/ms159162.aspx


    Cheers,

    Ben Sullins
    bensullins.com
    Beer is my primary key...

Viewing 7 posts - 1 through 6 (of 6 total)

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