0

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

Edited by Narue: added code tags & merged with next post

3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by hfx642
0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.