警告:在plsql中使用编译错误创建了程序包主体

问题描述

错误

警告:程序包主体创建时出现编译错误。 开始 * 第1行发生错误: ORA-04063:程序包主体“ P12284.EMP_DESIGNATION”有错误 ORA-06508:PL / sql:找不到正在被调用的程序单元: “ P12284.EMP_DESIGNATION” ORA-06512:在第二行

该如何解决?请帮助我,我不熟悉PL / sql

`

set serveroutput on;
    CREATE OR REPLACE PACKAGE EMP_DESIGNATION 
    AS
    PROCEDURE EMP_DETAILS(PS_design employee.designation%TYPE,PS_incentive number);
    END EMP_DESIGNATION;
    /
    CREATE OR REPLACE PACKAGE BODY EMP_DESIGNATION
    AS
    PROCEDURE EMP_DETAILS(design employee.designation%TYPE,incentive number)
    IS
    BEGIN
        update employee set employee.salary = employee.salary + incentive where designation = design ;
        DBMS_OUTPUT.PUT_LINE(sql%rOWCOUNT || ' employee(s) are updated');
         
    END;
    /
    `

解决方法

您有两个问题,

  1. for (index,folder) in folders.enumerated() { folder.folderPosition = index } 的签名在规范和正文上均应匹配

  2. 您忘记了emp_details程序包正文中的过程。

    end
,

您也需要结束包装体-

CREATE OR REPLACE PACKAGE BODY EMP_DESIGNATION
AS
    PROCEDURE EMP_DETAILS(design employee.designation%TYPE,incentive number)
    IS
    BEGIN
        update employee set employee.salary = employee.salary + incentive where designation = design ;
        DBMS_OUTPUT.PUT_LINE(SQL%ROWCOUNT || ' employee(s) are updated');
         
    END;
END EMP_DESIGNATION;
/