title: Not able to change value of Database Cell Based on Select Join
body: <p>I have this situation:</p>
  
  <p>Table A</p>
  
  <pre><code>|id|cgid|description|
  ---------------------
  |00|0002|some text 1|
  |01|0001|some text 2|
  |02|0002|some text 3|
  |03|0003|some text 4|
  |04|0005|some text 5|
  </code></pre>
  
  <p>and Table B</p>
  
  <pre><code>|a_id|cpid|
  -----------
  |  00| 010|
  |  00| 312|
  |  00| 040|
  |  01| 020|
  |  01| 312|
  |  01| 030|
  |  02| 210|
  |  02| 312|
  |  02| 130|
  </code></pre>
  
  <p><code>a_id</code> is the join column for <code>id</code> of Table A.</p>
  
  <p>Now I need to change all the rows in table B with <code>cpid=312</code> to <code>250</code> but only when the cgid of Table <code>A is 0002</code>.</p>
  
  <p>I can select all those entries with the following command:</p>
  
  <pre><code>SELECT  *
  FROM        A
  JOIN        B
  ON          A.id = B.a_id
  WHERE       A.cgid LIKE '0002'
  AND         B.cpid = 312
  </code></pre>
  
  <p>Any Help or Ideas would be very nice.</p>