title: Dynamic argument binding in dynamic stored procedure call oracle
body: <p>I have requirement not only to call a stored procedure dynamically but also to pass the parameters dynamically to that stored procedure. </p>
  
  <p>Arguments are coming from the <code>ALL_ARGUMENTS</code> table which is Oracle data dictionary table. These arguments are going to vary based on <code>rpt_wrapper_name</code>.</p>
  
  <p>For example sp1 will look like as below:</p>
  
  <pre><code>sp1 (v1, v2, v3)  
  </code></pre>
  
  <p>Stored procedure <code>sp2</code> will look like as below:</p>
  
  <pre><code>sp2 (v1, v2, v3, v4, v5) 
  </code></pre>
  
  <p>Stored procedure <code>sp3</code> will look like this:</p>
  
  <pre><code>sp3 (v1, v2, v3, v4, v5, v6, v7,...) 
  </code></pre>
  
  <p>Currently I am trying a dynamic SQL call, but this is not working for me</p>
  
  <pre><code>EXECUTE IMEDIATE 'BEGIN ' || p_Rpt_wrapper_name|| '(' || p_ParamList || ') ; END;'
  Using  p_ParamListUsing;
  
  where  
  p_ParamList := :v1,:v2,:v3
  p_ParamListUsing:= v1,v2,v3
  </code></pre>
  
  <p>Error: </p>
  
  <blockquote>
    <p>Not All variables as are bound ORA-01008</p>
  </blockquote>
  
  <p>Parameter list is going to vary based on <code>rpt_wrapper_name</code> </p>
  
  <p>How we can I achieve this? Please help</p>