title: Function : PLS-00306: wrong number or types of arguments in call to 'WORK_DAYS'
body: <p>I am trying to create a package that includes both a function and procedure, with the function being called in the procedure. I feel like my code below should work but I keep getting the error PLS-00306: wrong number or types of arguments in call to 'WORK_DAYS'. Any advice on what the issue is? </p>
  
  <p>I also think that when this will run it will return more than one row, anyway around throwing an error? I have used a For loop in the procedure but will I also need one in the function?</p>
  
  <pre><code>create or replace PACKAGE BODY WORK_ALLOCATION_OVERDUE IS
       FUNCTION WORK_DAYS 
      (P_EMP_ID IN NUMBER)
       RETURN NUMBER
      IS
          TOTAL NUMBER;
          BEGIN
          SELECT ROUND(WORK_END_DATE - SYSDATE) 
          INTO TOTAL
          FROM PL_WORK_ALLOCATION
          WHERE P_EMP_ID = D_EMP_ID;
          RETURN TOTAL;    
  END WORK_DAYS;    
  
  PROCEDURE WORK_DAYS_INFO
      (P_EMP_ID IN NUMBER)
      IS 
          CURSOR CUR_CRIME IS
          SELECT S_REPORTED_CRIME_ID, WORK_DESC, WORK_END_DATE
          FROM PL_WORK_ALLOCATION
          WHERE P_EMP_ID = D_EMP_ID
          GROUP BY D_EMP_ID, S_REPORTED_CRIME_ID, WORK_DESC, WORK_END_DATE;
  
          WORK_FLAG VARCHAR2(10);
      BEGIN
      FOR REC_CRIME IN CUR_CRIME LOOP
          IF WORK_DAYS &lt; 1 THEN 
              WORK_FLAG := 'OVERDUE';
          ELSIF WORK_DAYS &gt; 1 THEN
              WORK_FLAG := 'DUE';
          END IF;
  
          IF WORK_FLAG = 'OVERDUE' THEN
              DBMS_OUTPUT.PUT_LINE('Reported Crime: ' || REC_CRIME.S_REPORTED_CRIME_ID || ' Work Desc: ' || REC_CRIME.WORK_DESC || ' is ' || WORK_FLAG);
          END IF;
     END LOOP; 
  END    WORK_DAYS_INFO;    
  </code></pre>
  
  <p>END;​</p>