Random Project

Some useful addons

You can add at the beginning of the SELECT ‘SET rowcount 0′, will eventually save some people, would of saved me 🙂

If you need it for the last hour, you can add something like the below at the end:

and [h].[run_time]>replace(CONVERT(VARCHAR(8),dateadd(hour,-1,getdate()),108),’:’,”)

I have some jobs that when they fail, no matter if I fix the problem, I can’t re-run them until next week, and I don’t want to disble them and remember to enable them.