DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Procedure Do Not Compile.

  1. #1
    Join Date
    Apr 2002
    Posts
    36

    Procedure Do Not Compile.

    I am having problem with this Procedure: Can someone Help me.
    .Table emp exist in the Scott's schema.
    .scott has unlimited space on the tablespace
    . the tablespace USERS is 89% EMPTY.
    . scott has DBA Privilege (this is testing Enviroment, so donot be alarmed that scott has DBA privileges).

    I also Have same problem if I try compiling FUNCTION.


    -----------------------------------------

    1 create or replace procedure Emp_Procedure (p_empno in number)
    2 begin
    3 select ename
    4 from emp
    5 where empno = P_empno;
    6 dbms_output.put_line('this the employee I want to is ' ||' ' ||ename );
    7* end;
    Youssouf9i--SQL>/

    Warning: Procedure created with compilation errors.

    Youssouf9i--SQL>exec Emp_Procedure (7766);
    BEGIN Emp_Procedure (7766); END;

    *
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00905: object SCOTT.EMP_PROCEDURE is invalid
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    xuduro_2000

  2. #2
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Change it into something like:
    Code:
    create or replace procedure Emp_Procedure (p_empno in number)
    AS
      v_ename emp.ename%TYPE;
    begin
      select ename
      INTO v_ename
      from emp
      where empno = P_empno;
      dbms_output.put_line('this the employee I want to is ' ||' ' ||v_ename );
    end;
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  3. #3
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    dont you see it says:

    Warning: Procedure created with compilation errors?

Posting Permissions

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


Click Here to Expand Forum to Full Width