Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8749043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:37:43+00:00 2026-06-13T12:37:43+00:00

Here’s a procedure that I’m trying to run. It inserts into two tables –

  • 0

Here’s a procedure that I’m trying to run. It inserts into two tables – table1 and an association table table2.

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;"

Without the parameters, the query works fine. I.e. if I remove all the :somethings and hardcode the values then it runs with no errors when I run exec Insert_Row;

With the parameters (with the :somethings), there are errors:

show errors procedure Insert_Row;

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'

what am I doing wrong?

EDIT

Query after @ron tornambe’s solution is:

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;"

Error after this modification is:

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'

Many thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T12:37:44+00:00Added an answer on June 13, 2026 at 12:37 pm

    Try this

    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;
    

    You do not need to have colon if you are passing parameters, you could directly assign parameter names. Another point is if you are calling this procedure from a client or from front end, better remove commit from your procedure and use commit from your calling client.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is the problem that I am trying to solve. I have two folders
Here's what I'm trying to accomplish with this program: a recursive method that checks
Here's an example query: DECLARE @table table (loc varchar(10)) INSERT INTO @table VALUES ('134a'),
Here are the tables I have: Table A which has entries with item and
Here is the code in a function I'm trying to revise. This example works
Here is the code: create table `team`.`User`( `UserID` bigint NOT NULL AUTO_INCREMENT , `Username`
Here is my SQL script CREATE TABLE tracks( track_id int NOT NULL AUTO_INCREMENT, account_id
Here is the two scripts I have Script 1: <? include('config.php'); $json = $_POST['payload'];
Here is the css: #content ul { font-size: 12px; } I am trying this:
Here's what my table TheTable looks like ColA | ColB | ColC ------+-------+------ abc

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.