Question : exit a job in sql server 2008 r2


Oops!!! sorry for the wrong Zone --- cannot remove it now......intended for SQL SERVER 2008 R2)
-------i have 2 questions please
 have to schedule a job which has 3 steps.... order is like 1->2->3
so if 1 fils 2 should not run and eventually 3.
Now in my Step1 ...i have to check a condition based upon a return value from a stored proc ... if condition fails i want to exit out of the Job....
else simply go to next step.

Example:-      in Step 1
             if <return value !=  1>
               (i even tried with Return  -- but still, next step is being executed)
please let me know if there is a way....

(2) I want to send an email notification only upon failure of step 2 or its sebsequent steps ..not step 1. if step 1 fails i dont want any alert or email...... so is their any way i can customize the Email Notification options


Answer : exit a job in sql server 2008 r2

Use this formula....

="This is a string" & TRIM(A1) & " with date: "  & text(a2,"dd-mmm-yy")


Random Solutions  
programming4us programming4us