title: Execute Update with Union
body: <p>I have this Union statement:</p>
  
  <pre><code>(SELECT id FROM bby_venta_co WHERE nom_agrupacion = 'CAFE NESCAFE' 
  AND promocion_id = 100000189 
  AND ticket_id = 156 
  AND fondo_fijo_id = 14 
  AND caja_id = 1 ORDER BY costo DESC LIMIT 1)
  UNION ALL
  (SELECT id FROM bby_venta_co WHERE nom_agrupacion = 'CAFE INTERNA' 
  AND promocion_id = 100000189 
  AND ticket_id = 156 
  AND fondo_fijo_id = 14 
  AND caja_id = 1 ORDER BY costo DESC LIMIT 1);
  </code></pre>
  
  <p>which brings me two rows (214,158) and I need this information to execute my Update</p>
  
  <pre><code>UPDATE bby_venta_co SET tupla_usada = 1 WHERE id in(214,158); 
  </code></pre>
  
  <p>But when I try to use subqueries I get a syntax error with the UNION word.</p>
  
  <p>Can I mix the Update query with the Union statement? Or maybe Will I have to use two queries to get my accomplishment?. Any help will be appreciate.</p>