title: Oracle - TYPE TABLE - Collection Method EXISTS in IF Statement - ORA-06502: PL/SQL: erro: character to number conversion error
body: <p>I need to make a collection in a Package, but I don't know where was the mistake...</p>
  
  <p>This is my declaration and initialization:</p>
  
  <pre><code>avversao varchar2(30);
  TYPE tListaVersaoHomologada IS TABLE OF NVARCHAR2(30);
  vVersaoHomologada tListaVersaoHomologada := tListaVersaoHomologada('0.06', '0.07');
  </code></pre>
  
  <p>And this is where raise the exception</p>
  
  <pre><code>if NOT(vVersaoHomologada.EXISTS(avversao)) then
          ...
  end if;
  </code></pre>
  
  <p>The variable</p>
  
  <pre><code>avversao
  </code></pre>
  
  <p>Have one of the values:</p>
  
  <ul>
  <li>0.06</li>
  <li>0.07</li>
  </ul>
  
  <p>Reference:</p>
  
  <p><a href="http://docs.oracle.com/cd/B19306_01/appdev.102/b14261/collections.htm" rel="nofollow noreferrer">Using PL/SQL Collections and Records</a></p>
  
  <p><a href="https://docs.oracle.com/cd/B19306_01/appdev.102/b14261/collection_method.htm" rel="nofollow noreferrer">Collection Methods</a></p>