forums › forums › SQLyog › SQLyog: Bugs / Feature Requests › To Send An Email Based On A Condition
- This topic is empty.
-
AuthorPosts
-
-
April 29, 2011 at 3:19 pm #12318
Adrian Ceballos
MemberGood 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
-
April 29, 2011 at 3:29 pm #32197
Adrian Ceballos
MemberI am sorry, I did a big mistake posting on the monyog forums.
May I ask you to delete this post?
Thanks
-
May 2, 2011 at 9:21 am #32198
peterlaursen
ParticipantI 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.
-
May 2, 2011 at 9:24 pm #32199
Adrian Ceballos
MemberThank 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.
-
-
AuthorPosts
- You must be logged in to reply to this topic.