create or replace

PACKAGE BODY employee_details AS

      PROCEDURE INSERT_ROW
( 
    P_EMPNO                IN NUMBER ,
    P_ENAME              IN VARCHAR2 ,
    P_MGR                IN VARCHAR2 ,
    P_SAL                  IN  NUMBER,
    P_DEPTNO                IN NUMBER,
    P_COMM                  IN NUMBER,
    P_HIREDATE           IN  VARCHAR2,
    P_JOB               IN   VARCHAR2,
    P_error_message      OUT VARCHAR2 
  )
  is
  l_EMPNO  NUMBER;
  l_object_name VARCHAR2(60) := 'employee_details.INSERT_ROW';
BEGIN
  te_trace('Entered into Insert employee_details',FALSE,NULL,l_object_name,10);
   SELECT empno.NEXTVAL INTO l_empno FROM DUAL;
  INSERT INTO xxeis.employee
    (
      NO,
      NAME,
      MGR,
      SAL,
      DEPTNO,
      COMM,
      HIREDATE,
      JOB
      )
    VALUES
    (
      l_EMPNO,
      P_ENAME,
      P_HIREDATE,
      P_SAL,
      P_MGR,
      P_COMM,
      P_DEPTNO,
      P_JOB
    );
  te_trace('Insertion of Data into employee Table Successfully ',FALSE,NULL,l_object_name,20);
 EXCEPTION
WHEN OTHERS THEN
    p_error_message :=SUBSTR(SQLERRM, 1, 200);
  te_trace('Failed to Insert Data into employee Table'||p_error_message ,FALSE,NULL,l_object_name,30);
  raise_application_error(-20001, p_error_message);
  END  INSERT_ROW ;
  
END  employee_details ;

Error(4,11): PLS-00323: subprogram or cursor 'INSERT_ROW' is declared in a package specification and must be defined in the package body

Have you compiled the package specifications before trying to compile the package body ?

Member Avatar for hfx642

IF you do have a package spec...
Do the Parameter Names and Data Types in the package body match the package spec?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.