Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2011
    Posts
    2

    Unanswered: Error at line 14: PLS-00103: Encountered the symbol "PROCEDURE"

    CREATE OR REPLACE PACKAGE BODY hellofrom
    IS
    PROCEDURE proc_two(p_input_2 IN NUMBER );
    BEGIN
    if p_input_2 = 2
    THEN
    DBMS_OUTPUT.PUT_LINE( 'Hello from input two ');
    proc_three(3);
    else
    DBMS_OUTPUT.PUT_LINE( 'Try entering 1 ');
    END IF;
    END proc_two;

    PROCEDURE proc_three (p_input_3 IN NUMBER );
    BEGIN
    if p_input_3 = 3
    THEN
    DBMS_OUTPUT.PUT_LINE( 'Hello from input three ');
    else
    DBMS_OUTPUT.PUT_LINE( 'Try entering 1 ');
    END IF;
    END proc_three;

    PROCEDURE proc_one (p_input_x IN NUMBER );
    BEGIN
    if p_input_x = 1
    THEN
    DBMS_OUTPUT.PUT_LINE( 'Hello from input one ');
    hellofrom.proc_two(2);
    else
    DBMS_OUTPUT.PUT_LINE( 'Try entering 1 ');
    END IF;
    END proc_one;

    END hellofrom;


    get error when trying to complie proc_two and proc_three are private proceduce

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Code:
    CREATE OR replace PACKAGE BODY hellofrom
    IS
      PROCEDURE Proc_two(p_input_2 IN NUMBER)
      AS
      BEGIN
        IF p_input_2 = 2 THEN
          dbms_output.Put_line('Hello from input two ');
    
          Proc_three(3);
        ELSE
          dbms_output.Put_line('Try entering 1 ');
        END IF;
      END proc_two;
      PROCEDURE Proc_three (p_input_3 IN NUMBER)
      AS
      BEGIN
        IF p_input_3 = 3 THEN
          dbms_output.Put_line('Hello from input three ');
        ELSE
          dbms_output.Put_line('Try entering 1 ');
        END IF;
      END proc_three;
      PROCEDURE Proc_one (p_input_x IN NUMBER)
      AS
      BEGIN
        IF p_input_x = 1 THEN
          dbms_output.Put_line('Hello from input one ');
    
          hellofrom.Proc_two(2);
        ELSE
          dbms_output.Put_line('Try entering 1 ');
        END IF;
      END proc_one;
    END hellofrom;
    /
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Mar 2011
    Posts
    2
    Thank you for the answer again thanks very much

Posting Permissions

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