title: ORA-00932 inconsistent datatypes expected char got number
body: <p>When I try to execute the query below I get the error:</p>
  
  <blockquote>
    <p>ORA-00932 inconsistent datatypes expected char got number</p>
  </blockquote>
  
  <pre><code>select (case when upper (TEXT) &lt;&gt; lower (TEXT) then 'INVALID'
               else sum(TEXT)
          end) 
    from CLASS 
   where SECTION = 'SEVENTH' 
  </code></pre>
  
  <p>The query works fine when I remove SUM in ELSE condition> But I need to SUM the Text to achieve the expected result.</p>