title: oracle call stored procedure inside select
body: <p>I'm working on a query (a SELECT) and I need to insert the result of this one in a table.
  Before doing the insert I have some checking to do, and if all columns are valid, I will do the insert.</p>
  
  <p>The checking is done in a stored procedure. The same procedure is used somewhere else too.
  So I'm thinking using the same procedure to do my checks.</p>
  
  <p>The procedure does the checkings and insert the values is all OK.</p>
  
  <p>I tryied to call the procedure inside my SELECT but it does not works.</p>
  
  <pre><code>SELECT field1, field2, myproc(field1, field2)
  
  from MYTABLE.
  </code></pre>
  
  <p>This kind of code does not works.</p>
  
  <p>I think it can be done using a cursor, but I would like to avoid the cursors.
  I'm looking for the easiest solution.</p>
  
  <p>Anybody, any idea ?</p>