Unsupported Screen Size: The viewport size is too small for the theme to render properly.

To Send An Email Based On A Condition

forums forums SQLyog SQLyog: Bugs / Feature Requests To Send An Email Based On A Condition

  • This topic is empty.
Viewing 3 reply threads
  • Author
    Posts
    • #12318

      Good morning,

      I have been using SQLYog ultimate for the last months and I love it.

      Last week I needed to sent a report with some invoices. So I used the “SQLScheduler and reporting tools” option to schedule a query. My problem is that sometimes the query will produce an empty result set (0 records), so if the result set is empty I don't want to send the email.

      Even I tried to work around this raising an error (thinking that I would prefer to have an error in some error.log than having an empty mail sent to my end user. But I got an email with the error message.)

      Question, would you consider an option “do not sent email if error is found” or much better “type a condition, if condition is true then mail will be sent”.

      Thanks!

      Adrian

    • #32197

      I am sorry, I did a big mistake posting on the monyog forums.

      May I ask you to delete this post?

      Thanks

    • #32198
      peterlaursen
      Participant

      I have deleted the post in the MONyog cattegory. I have also added this to our issue tracker: http://code.google.c…/detail?id=1633

      But please explain: isn't an empty query result as valid a result as any other result? I could clearly imagine that in particular an empty result should be notified.

    • #32199

      Thank you Peter,

      On this particular case we have users creating on the ERP some invoices with an invalid project code (is like an invalid customer code).

      So a simple SQL statement like this:

      select * from invoices

      where ProjectCode not in

      (select ProjectCode from ProjectInventory)

      Will tell us that incorrect invoices were created and we can fix the problem right away.

      This problem happens only 1 or 2 times in a month, that is why I would like to schedule the query to be executed every day but I would like to send the email only those 1 or 2 times in the month when the “select” return rows.

Viewing 3 reply threads
  • You must be logged in to reply to this topic.