title: SQL - Raise error in Sproc when the select result set is empty
body: <p>I am trying to execute a stored procedure within a SQL JOB step (SQL Server 2005).<br>
  I want to Raise error and fail the job step when the result set of the stored procedure I am executing is not empty. </p>
  
  <p>what my stored procedure does is --I have a select statement where the rows are displayed if the current date is equal to the date in one of the columns of a table. </p>
  
  <pre><code>SELECT 
  Holiday_date
  from tblHolidays 
  where 
  CONVERT(VARCHAR(10),GETDATE(),101) = CONVERT(VARCHAR(10),Holiday_date,101)
  </code></pre>
  
  <p>If the result set is empty, I want to succeed the job step and proceed with the next job step.</p>
  
  <p>Any thoughts on how to get this working.</p>
  
  <p>Thanks</p>