I am using SQL Server 2005 and I need to force a job to fail based on a condition of an IF statement. This is an overview what my code is doing:
IF (SELECT '1') = 1
The above isn't my exact code but this gives a very short overview what my code is achieving at present.
Basically where it says PRINT 'No' I want it to fail the job instead so it can send an email notification out based on that failure.
Is that possible to accomplish?
Thanks in advance.