title: Modify column records based on values in a different table
body: <p>I am trying to modify records in a column of one table whenever I meet some condition in another table.  </p>
  
  <p>Specifically, whenever there is a 'y' in the RobotComRein.Reinforcement table/column, I want to add a 1 to the table/column: RobotComYN.Yesses.  </p>
  
  <p>Furthermore, both tables have columns called "RobotID" and "Command" and I would like to make the change only when the following condition is met:</p>
  
  <p>RobotComRein.RobotID = RobotComYN.RobotID 
  AND RobotComRein.Command = RobotComYN.Command</p>
  
  <p>I have tried messing around with the following SQL statement.</p>
  
  <pre><code>UPDATE RobotComYN
  SET Yesses = Yesses + 1
  WHERE RobotComRein.Reinforcement IN (
      SELECT RobotComRein.Reinforcement
      FROM RobotComRein
      WHERE RobotComRein.Reinforcement = 'y' 
      AND RobotComRein.RobotID = RobotComYN.RobotID 
      AND RobotComRein.Command = RobotComYN.Command
  );
  </code></pre>
  
  <p>I receive the following error message:
  "no such column: RobotComRein.Reinforcement"</p>