Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2013
    Posts
    2

    Unanswered: Stored procedure error PLS-00103: Encountered the symbol "/"

    Hello,
    Been getting error

    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00103: Encountered the symbol "/" when expecting one of the following:
    ..
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00103: Encountered the symbol "/" when expecting one of the following:

    For procedure below, could someone help me out?

    CREATE OR REPLACE PROCEDURE bulkInsert()
    AS
    BEGIN
    FOR x IN 1..100
    LOOP
    INSERT INTO orders
    (order_id,order_name,order_status)
    VALUES
    (x, "Fish", 'Y');
    END LOOP;
    COMMIT;
    END bulkInsert;
    /

    regards
    Sameer

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Which tool did you use to execute that code?

    After fixing two errors you've made (remove brackets after procedure's name and substitute double quotes with single quotes in line 9 ("Fish")), procedure gets created:
    Code:
    SQL> l
      1  CREATE OR REPLACE PROCEDURE bulkInsert
      2  AS
      3  BEGIN
      4  FOR x IN 1..100
      5  LOOP
      6  INSERT INTO orders
      7  (order_id,order_name,order_status)
      8  VALUES
      9  (x, 'Fish', 'Y');
     10  END LOOP;
     11  COMMIT;
     12* END bulkInsert;
    SQL> /
    
    Procedure created.
    
    SQL>

  3. #3
    Join Date
    Jun 2013
    Posts
    2
    Was not using any IDE just a Text editor. Rookie mistake.Now working with SQL Developer.
    Thank you for correcting syntax
    regards
    Sameer

  4. #4
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Text editor? Text editors don't raise ORA-xxxxx messages.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •