title: How to use CASE expression to update a table with inner queries
body: <p>I have used the following update query :</p>
  
  <pre><code>UPDATE datA_table T
  SET T.VALUE=
    (SELECT   
        CASE 
           WHEN t3.h1 =(t3.h2) and t3.h1=(t3.h3) THEN t3.h1
           ELSE 
      Case
      wHEN T3.h1 &lt; &gt; T3.h2 THEN T3.h2
          ELSE
              cASE
                  wHEN T3.h1 &lt; &gt; T3.h3 THEN T3.h3
              eND
      eND
        END 
        from datA_table t3)T1
  where t.time=t1.time and t.name=t1.name
  </code></pre>
  
  <p>But this is giving the following error:</p>
  
  <blockquote>
    <p>Error report - SQL Error: ORA-00933: SQL command not properly ended
    00933. 00000 - "SQL command not properly ended"</p>
  </blockquote>
  
  <p>Is there any way to resolve this issue?</p>