title: SQL Server Job Scheduler : error while updating data
body: <p>I'm trying to update data of a table using Job Scheduler in sql server 2012. 
  the following query is being executed:</p>
  
  <pre><code>UPDATE COM_TB_Inventory
          SET Location = 'Transit'
      WHERE Location = 'On Order' AND SDate IS NOT NULL 
          AND CONVERT(DATE,CONVERT(DATETIME,SDate,103)) = CONVERT(DATE,GETDATE())
  </code></pre>
  
  <p>Here, 'sDate' field contains date but it's a varchar type of data field. If I execte this query manually then it works. But the scheduler is not working. I'm getting the following error:</p>
  
  <blockquote>
    <p>Executed as user: NT SERVICE\SQLSERVERAGENT. Warning: Null value is
    eliminated by an aggregate or other SET operation. [SQLSTATE 01003]
    (Message 8153)  Subquery returned more than 1 value. This is not
    permitted when the subquery follows =, !=, &lt;, &lt;= , >, >= or when the
    subquery is used as an expression. [SQLSTATE 21000] (Error 512)  The
    statement has been terminated. [SQLSTATE 01000] (Error 3621).  The
    step failed.</p>
  </blockquote>
  
  <p>a little help will be much appreciated. thnx</p>