How to programmatically stop an executing Job from a within a step
I am new to creating/managing SQL Agent Jobs. I need to create a Job with multiple steps in which either the job must be stopped if a certain condition is meet during the first step processing. Is there a way to issue a command in a step that would make the job stop?
I have been spending quite a bit of time searching on the WEB and I can not find what I am looking for. Any help will be greatly appreciated.