This is sooooooo very urgent. I need to know if there's any way to refrain from sending an email if the tSQL behind the rdl is empty? it's a trading report, clearing information is sent out in a report via reporting services. i do not want to send a blank email if no trades exist. but i must have it in place/enabled/scheduled, such that the report does capture trades if/when they occur. i've got the report and subscription created, i just now received a blank email. i cannot do that once this is deployed
similarly, and slightly less urgent, can i add business day logic to the sql agent job? i use this piece in each of my sql agent jobs:
SET DATEFIRST 7
IF DATEPART(WEEKDAY, GETDATE()) BETWEEN 2 AND 6
AND NOT EXISTS (SELECT 1 FROM database.dbo.calendartable WHERE dt = CONVERT(CHAR(8), GETDATE(), 112) AND isholiday = 1)a
this way i can remain consistent with the business days defined in my calendar table. (you know...don't send a blank report on christmas day)
is there any reason why i cannot put the same condition into the RS-created SQL Agent jobs ?