How to add condition for an sql task

  • There was an SSC article about this just a few days ago, which you might find helpful:

    http://www.sqlservercentral.com/articles/Monitoring/69649/

  • can anybody please help ne writing the condition here ,

    the procedure given in link is such a big one and i dont have permissions for doing so...

  • Why do you need the row_num > 1?

  • rds207 (3/27/2010)


    can anybody please help ne writing the condition here ,

    the procedure given in link is such a big one and i dont have permissions for doing so...

    No-one's going to write it for you, no 🙂

    I linked to the article, not to give you a copy-and-paste solution, but to give you ideas.

    If you do not have the permissions or skill set to do this, pass the link to someone who does.

  • row_num is the indentity column i have created in the temp table , where the run_duration > 18000 data enters into temp table and this colomn values increases by 1.

    i created this column just to know that there are some records which got hanged and an email notification has to be sent based on this row_num ...that means this row gets incremented only when the jobs get hanged and hanged job data comes into temp table, and every time i run the job say for every day or so i truncate the temp table , so that each time the job runs it chechks the data in sysjobhistory table and if any data with run_duration > 18000 , sends it to temp table which should trigger alert email ...

Viewing 5 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply