title: Run Update Query with Agent Job
body: <p>We have a SQL Agent job that is set to run the following query.  Unfortunately either on a schedule or manually started the job fails, but does not leave any data in the error logs.</p>
  
  <p>There is a single step that needs to run the following query:</p>
  
  <pre><code>UPDATE TB1
  SET TB1.STATUS = 'Complete'
  
  FROM    
    Table1.dbo.A_P as TB1
    INNER JOIN [LS1].DB1.dbo.Detail AS CD ON CD.ID = TB1.ID
    JOIN [LS1].Header AS Header ON Header.ID = TB1.ID
  
  WHERE 
  TB1.STATUS='approved'
  AND Header.Status='C';
  </code></pre>
  
  <p>Any ideas?</p>