title: Why can't I update more than one column at the same time using With keyword?
body: <p>I have an update statement shown below that works fine, I used a with statement in the subquery to greatly improve performance but for some reason I'm not allowed to add an additional column from the same table to update.</p>
  
  <p>Works:</p>
  
  <pre><code>UPDATE Table_A SET (Col_One) = (WITH OneValue AS (SELECT DISTINCT t.Col_One
                                                    FROM Table_Two t, Table_A a
                                                    WHERE t.id = a.New_Id))
                                  SELECT Col_One FROM OneValue);
  </code></pre>
  
  <p>What I'd like to do is just include another column to update also from table_two like this</p>
  
  <pre><code>UPDATE Table_A SET (Col_One, Col_Two) = (WITH OneValue AS (SELECT DISTINCT t.Col_One, T.Col_two
                                                    FROM Table_Two t, Table_A a
                                                    WHERE t.id = a.New_Id))
                                  SELECT Col_One, Col_Two FROM OneValue);
  </code></pre>
  
  <p>but I get ora-01767 update set expression must be a subquery. I understand this error but fail to see how I'm generating it. Any help is greatly appreciated.</p>
  
  <p>Thanks in advance.</p>