title: Stored procedure with select count(*) and use count in IF statement
body: <p>I am creating a stored procedure in Oracle database that's resulting in error &quot;ORA-01858: a non-numeric character was found where a numeric was expected&quot;.</p>
  <p>My procedure is as below:</p>
  <pre><code>create or replace procedure testProc(
  id IN VARCHAR2,
  user IN VARCHAR2,
  sender IN VARCHAR2
  )
  as 
  
  vCount number;
  begin
       select count(*) into vCount from table1 where id='12345'
       
       if vCount=0
           insert into table1 (id, user, sender, status) values (id, user, partner, status);
       else
           update table1 set status='ERR' where id='12345'
       end if;
  end procedure;
  </code></pre>
  <p><em>Error: ORA-01858: a non-numeric character was found where a numeric was expected</em></p>
  <p>I tried replacing vCount as int that did not help. Also tried declaring vCount below sender IN VARCHAR2.</p>
  <p>Can someone please tell what is correct way to use the above procedure.</p>