title: PL/SQL 'select in' from a list of values whose type are different from the outer query
body: <p>I have the following tables : </p>
  
  <pre><code>Table1 ( Col1 : varchar2, Col2 : number, Col3 : number)
  Table2 ( Col1 : number, Col2 : varchar2, Col3 : varchar2)
  </code></pre>
  
  <p>I want to run a query like this :</p>
  
  <pre><code>select distinct Col2 from Table1 where Col1 in 
  (
     select Col1 from Table2
  )
  </code></pre>
  
  <p>Table1.Col1 is of type varchar2 while Table2.Col1 is of type number. so, I need to do some casting, it seems but it fails to succeed.</p>
  
  <p>The problem is that any attempts to run the query returns the following error :</p>
  
  <pre><code>  ORA-01722: invalid number
    01722. 00000 -  "invalid number"
    *Cause:    
    *Action:
  </code></pre>
  
  <p>Table1.Col1 contains some null values.</p>