title: Can't bind variables in Oracle procedure
body: <p>Here's a procedure that I'm trying to run.  It inserts into two tables - <code>table1</code> and an association table <code>table2</code>.</p>
  
  <pre><code>create or replace procedure Insert_Row (summary IN VARCHAR2
     description IN VARCHAR2, status IN NUMBER, 
     date_submitted IN DATE, last_updated IN DATE,
     owner_id IN NUMBER, reporter_id IN NUMBER,
     foo IN VARCHAR2, bar IN VARCHAR2,
     first_assignee IN NUMBER) 
  is
     l_cur_id number;
  begin
     insert into table1 
        (summary, description, status, date_submitted, 
         last_updated, owner_id, reporter_id, 
         foo, bar)
      values( :summary, :description, :status, 
              to_date(:date_submitted,'YYYY-MM-DD'), 
              to_date(:last_updated,'YYYY-MM-DD'), :owner_id, 
              :reporter_id, :foo, :bar)
              returning action_id into l_cur_id; 
      insert into table2(action_id, assignee_id) 
      values(l_cur_id,:test);
      commit;
   end;"
  </code></pre>
  
  <p>Without the parameters, the query works fine.  I.e. if I remove all the <code>:somethings</code> and hardcode the values then it runs with no errors when I run <code>exec Insert_Row;</code></p>
  
  <p>With the parameters (with the <code>:somethings</code>), there are errors:</p>
  
  <p><code>show errors procedure Insert_Row;</code></p>
  
  <pre><code>Errors: check compiler log
  2/4            PLS-00103: Encountered the symbol "DESCRIPTION" when expecting one of the following:
  
     := . ) , @ % default character
  The symbol "," was substituted for "DESCRIPTION" to continue.
  
  14/13          PLS-00049: bad bind variable 'SUMMARY'
  14/23          PLS-00049: bad bind variable 'DESCRIPTION'
  14/37          PLS-00049: bad bind variable 'STATUS'
  15/21          PLS-00049: bad bind variable 'DATE_SUBMITTED'
  16/21          PLS-00049: bad bind variable 'LAST_UPDATED'
  16/50          PLS-00049: bad bind variable 'OWNER_ID'
  17/13          PLS-00049: bad bind variable 'REPORTER_ID'
  17/27          PLS-00049: bad bind variable 'FOO'
  17/33          PLS-00049: bad bind variable 'BAR'
  20/21          PLS-00049: bad bind variable 'TEST'
  </code></pre>
  
  <p>what am I doing wrong?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Query after @ron tornambe's solution is:</p>
  
  <pre><code>create or replace procedure Insert_Row (summary IN VARCHAR2,
     description IN VARCHAR2, status IN NUMBER, 
     date_submitted IN DATE, last_updated IN DATE,
     owner_id IN NUMBER, reporter_id IN NUMBER,
     foo IN VARCHAR2, bar IN VARCHAR2,
     first_assignee IN NUMBER) 
  is
     l_cur_id number;
  begin
     insert into table1 
        (summary, description, status, date_submitted, 
         last_updated, owner_id, reporter_id, 
         foo, bar)
      values( :summary, :description, :status, 
              to_date(:date_submitted,'YYYY-MM-DD'), 
              to_date(:last_updated,'YYYY-MM-DD'), :owner_id, 
              :reporter_id, :foo, :bar)
              returning action_id into l_cur_id; 
      insert into table2(action_id, assignee_id) 
      values(l_cur_id,:test);
      commit;
   end;"
  </code></pre>
  
  <p>Error after this modification is:</p>
  
  <pre><code>14/13          PLS-00049: bad bind variable 'SUMMARY'
  14/23          PLS-00049: bad bind variable 'DESCRIPTION'
  14/37          PLS-00049: bad bind variable 'STATUS'
  15/21          PLS-00049: bad bind variable 'DATE_SUBMITTED'
  16/21          PLS-00049: bad bind variable 'LAST_UPDATED'
  16/50          PLS-00049: bad bind variable 'OWNER_ID'
  17/13          PLS-00049: bad bind variable 'REPORTER_ID'
  17/27          PLS-00049: bad bind variable 'FOO'
  17/33          PLS-00049: bad bind variable 'BAR'
  20/21          PLS-00049: bad bind variable 'TEST'
  </code></pre>
  
  <p>Many thanks.</p>