Further PL/SQL issues

I made a post before asking for help, and it was all really useful. But I have run into another error I can’t quite explain.

So my new problem is this:

Error at line 0: PL/SQL: Compilation unit analysis terminated

Here is the code:

CREATE OR REPLACE PROCEDURE deploy_employee(
    EMP_USERNAME IN EMPLOYEE)

IS

    emp_user VARCHAR2(50);
    emp_pass VARCHAR2(50);

BEGIN

  FOR indx IN NVL (EMP_USERNAME.FIRST, 0) .. NVL (EMP_USERNAME.LAST, -1)

  LOOP

    BEGIN
      BEGIN
        SELECT EMP_USERNAME INTO emp_user FROM EMPLOYEE;
        SELECT EMP_PASSWORD INTO emp_pass FROM EMPLOYEE;
      EXCEPTION
      WHEN NO_DATA_FOUND THEN
        emp_user  := NULL;
        emp_pass  := NULL;
      END;
      APEX_UTIL.CREATE_USER( p_user_name => emp_user, 
                             p_web_password => emp_pass );
    END;
  END LOOP;

END deploy_employee;

Does anyone know the issue with this, I can’t seem to find an answer (any help would be fantastic :D)


Source: oracle

Leave a Reply