Data driven subscription based on query output

  • I wanted to set up a data driven subscription based on a query output. The report should be delivered only if there is a results in the output else no email should go out.

    So the query is in stored procedures with 2 parameter. How do we set up the scheduler/email so that no email is send when there is no data in the result set

  • A data driven subscription doesn't send out emails when there are no rows returned. So just write the procedure so that results are returned only when you want to send out emails.

    The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge. - Stephen Hawking

  • This is for version 2005 . correct ?

  • Yes, it works that way for all versions as far as I know.

    The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge. - Stephen Hawking

  • Here is what I do :

    On step 3 ( Create a data-driven subscription)

    select * from table

    On step 5 ( 2 parameters) are set.

    Name

    State

    For Step 5 parameters if no data is returned you mean no Emails is send ?

  • sethu raman (8/3/2011)


    Here is what I do :

    On step 3 ( Create a data-driven subscription)

    select * from table

    On step 5 ( 2 parameters) are set.

    Name

    State

    For Step 5 parameters if no data is returned you mean no Emails is send ?

    Rows have to be returned in Step 3 in order for emails to be sent. Step 5 is for additional options and used for what type of delivery (such as Email, but I sort of took that one for granted).

    This site shows a good step-by-step process.

    The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge. - Stephen Hawking

  • Thank you .

    My report email depends on the Step 5 output, if any rows then email

  • You're welcome, 'glad to help.

    The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge. - Stephen Hawking

  • Still my issue is not resolved.

    Step 5 decides if there is output it needs to send email.

    Do you think any place we can control the email at this point?

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

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