title: PLSQL user defined table types and joins
body: <p>Let's say I have a user defined table type:</p>
  
  <pre><code>create or replace type SrcCodeTbl is table of varchar(20);
  </code></pre>
  
  <p>I have a procedure that has a parameter of this type:</p>
  
  <pre><code>create or replace procedure Blah.MyProc( srcCodesIN in SrcCodeTbl )
  </code></pre>
  
  <p>Can I use <code>srcCodesIn</code> in a select/join statement with another table within the procedure? Been trying to get it to work, and the compiler keeps reporting:</p>
  
  <pre><code>select distinct someVal into outVal 
  from OtherTable ot, srcCodesIn sc 
  where ot.ID = sc.column_val;
  
  Error(28,22): PL/SQL: ORA-00942: table or view does not exist
  </code></pre>
  
  <p>I'm sure its something simple with the syntax, I just haven't been able to figure it out. I did get something to work with a for-loop, but I'm interested if there's another way to do it. Thanks.</p>