title: Oracle EXECUTE IMMEDIATE with variable number of binds possible?
body: <p>I need to use dynamic SQL execution on Oracle where I do not know the exact number of bind variables used in the SQL before runtime.</p>
  
  <p>Is there a way to use a variable number of bind variables in the call to <code>EXECUTE IMMEDIATE</code> somehow?</p>
  
  <p>More specifically, I need to pass <strong>one</strong> parameter into the unknown SQL but I do not know how often it will be used there.</p>
  
  <p>I tried something like</p>
  
  <pre><code>EXECUTE IMMEDIATE 'SELECT SYSDATE FROM DUAL WHERE :var = :var' USING 1;
  </code></pre>
  
  <p>But it threw back with <code>ORA-01008: not all variables bound.</code></p>