title: oracle update first 4 characters with column value from another table
body: <p>This is the query I am using to update a column with value from another table :</p>
  
  <pre><code>UPDATE SPICES A
    SET A.description = (SELECT CODE
                           FROM CHILLY B
                           WHERE SUBSTR(A.description,1,4) = TRIM(B.desc123))
    WHERE EXISTS (SELECT 1
                    FROM CHILLY B
                    WHERE SUBSTR(A.description,1,4) = TRIM(B.desc123));
  </code></pre>
  
  <p>But this is not what I want . The requirement is to update the first 4 characters of description with the new value (CODE) from table CHILLY.</p>
  
  <p>Any suggestions? new to writing queries.</p>