title: PL/SQL: numeric or value error%s error converting character to number
body: <p>I have a problem with a pl/sql anonymous block. Although I can show the variables that get with select query, I get a casting error if I use it in update sentence.</p>
  
  <p>My code looks like this:</p>
  
  <pre><code>set serveroutput on
  
  DECLARE
  
  var1 scheme.table.column1%type; /* number[8,0] */
  var2 scheme.table.column2%type; /* number[8,2] */
  
  BEGIN
  
  /* return simple value */
  select t.column1, t.column2
  into var1, var2
  from scheme.table t
  where &lt;condition&gt;
  
  DBMS_OUTPUT.PUT_LINE('Var1 is: ' || var1 || ' Var2 is:' || var2); /* fine!!*/
  
  update scheme.table
  set scheme.table.column1 = var1 + 1
  where scheme.table.column2 = var2; /* that is line error*/
  
  END;
  
  /*
  ORA-06502: PL/SQL: error : error de conversión de carácter a número numérico o de valor
  ORA-06512: en línea 58
  06502. 00000 -  "PL/SQL: numeric or value error%s"
  */
  </code></pre>
  
  <p>Can somenone help me?</p>