title: MYSQL Update from a select subquery
body: <p>The data in the Response column is = <code>blahblahblahTYPE=ERRORblahblah</code>. I then run the query below to just target the 'ERROR' string.</p>
  
  <pre><code>SELECT substr(Response, instr(Response, 'ERROR'), 5) 
    FROM table 
    WHERE id = 721451 
      AND Status = 'false' 
      AND Response LIKE '%&lt;status&gt;Unknown&lt;/status&gt;%' 
      AND date &gt;= curdate();
  </code></pre>
  
  <p>The query above returns: <code>ERROR</code>.</p>
  
  <p>I basically want to update <code>ERROR</code> to <code>SUCCESS</code> without editing the rest of the data.</p>
  
  <p>Would the query below work? Is there a better way to do this?</p>
  
  <pre><code>UPDATE table 
    SET Response = 'SUCCESS' 
    WHERE (
      SELECT substr(Response, instr(Response, 'ERROR'), 5) 
        FROM table 
        WHERE id = 721451 
          AND Status = 'false' 
          AND Response LIKE '%&lt;status&gt;Unknown&lt;/status&gt;%' 
          AND date &gt;= curdate()
    );
  </code></pre>
  
  <p>Thanks for your help in advance!</p>