August 13, 2013 at 3:57 pm
Hi Experts,
Requirement: check for entries in a table for every one hour and Send an email to x,y,z when there are no entries in to that table for more than 1 hour, this table has Entrytime column.
For: If the programme checked table at 1:00PM and if there are no entries in table after 12:00(on EntryTime Column)it should email to the users saying there are no entries for the duration 12:00PM to 1:00PM. Next check should be done at 2:PM and it should check for the values for 1:00 pm to 2:00 pm...
Any other way we can implement this without TRIGGERS?
Any input is appreciated
Thanks in advance
August 13, 2013 at 7:01 pm
Create a SQL Agent job that runs a Stored Procedure and sends your email (or not) at the suggested intervals.
My thought question: Have you ever been told that your query runs too fast?
My advice:
INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.
Need to UNPIVOT? Why not CROSS APPLY VALUES instead?[/url]
Since random numbers are too important to be left to chance, let's generate some![/url]
Learn to understand recursive CTEs by example.[/url]
[url url=http://www.sqlservercentral.com/articles/St
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply