Home Forums Programming General Call sp from a Case statement RE: Call sp from a Case statement

  • Vitor da Fonseca - Monday, December 4, 2017 7:01 AM

    Not as simple as that, sorry
    Two distinct jobs which one with different steps, that is why I am having difficulties: crying:

    Why not get the jobs to call each other, End of Job 1 Start Job 2, End of Job 2 Start Job 3

    Create a logic table, end of Job 1 Populate a table with a row of value 1.  end of Job 2 Populate a second row with value 1.  job 3 running always, if sum(value) = 2 exec sp_churnrate  reset the values to 0. rinse and repeat  or go with IF TableA.Date = CONVERT(DATE,GETDATE()) AND TableB.Date = CONVERT(DATE,GETDATE()) EXEC sp_churnrate.

    Problem with the latter option if the job is constantly running to check if the values match then the stored proc will always be running.