title: How to get a record using EXECUTE IMMEDIATE?
body: <p>I have a bunch of functions with signatures like:  </p>
  
  <pre><code>FUNCTION func1 (par1 IN VARCHAR2, par2 IN NUMBER) RETURN my_rec;  
  </code></pre>
  
  <p>and I have a function for retrieving data from this bunch of functions:  </p>
  
  <pre><code>FUNCTION get_result (func_name IN VARCHAR2, par1 IN VARCHAR2, par2 IN NUMBER) RETURN my_rec;
  IS
      rec1 my_rec;
  BEGIN
      EXECUTE IMMEDIATE 'SELECT ' || func_name || '(:par1, :par2) FROM DUAL'
      INTO rec1
      USING IN par1, IN par2;
  
      RETURN rec1;
  END;
  </code></pre>
  
  <p>but this code fails with ORA-01007 'variable not in select list'.<br>
  How can I rewrite statement?</p>