title: Using REPLACE within Oracle CASE statement
body: <p><code>mytext</code> is a column in <code>mytable</code> containing the values <code>('ABC123','ABC456','Alphabet 123','Alphabet 456', 'DEF123' ...)</code>, but I want them all to be formatted as <code>'ABC123'</code>.  I can't get the syntax right</p>
  
  <pre><code>UPDATE mytable 
    SET mytext = 
       CASE
         WHEN (mytext like 'Alphabet %') Then REPLACE(mytext, 'Alphabet ', 'ABC')
         WHEN (mytext like 'Dookickey %') Then REPLACE(mytext, 'Doohickey ', 'DEF')
         WHEN (mytext like 'Goofiness %') Then REPLACE(mytext, 'Goofiness ', 'GHI')
         ELSE -- I want no other rows to be processed
       END;
  </code></pre>