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

  • Thom A - Monday, December 4, 2017 6:22 AM

    Wait... That SP is only doing deletes and inserts..? What would you be expecting your unnamed column to be returning in your select statement, considering that your SP isn't returning any data.

    Think this is more workflow, so instead of SELECT CASE should be an IF statement.

    Vitor da Fonseca - Monday, December 4, 2017 6:08 AM

    Hi, Many thanks for your reply. What I'm trying to do is running a script/code which I put in a ‘Stored Procedure’ after the other two jobs have completed successfully
      

    What is the logic behind the two jobs, how do they execute, is it via SQL Agent, windows task scheduler or some other methods?

    If they are automated jobs like the SQL Agent, just add another step and do an IF check 

    IF This = That
    BEGIN
    EXEC sp_churnrate
    END