## Try using NOT EXISTS in place of NOT IN


   SELECT . . .
   FROM   EMP
   WHERE  DEPT_NO NOT IN ( SELECT DEPT_NO
                           FROM   DEPT
                           WHERE  DEPT_CAT = 'A');


## To improve performance, replace this code with:

   SELECT . . .
   FROM   EMP E
   WHERE  NOT EXISTS ( SELECT  X' 
                       FROM   DEPT
                       WHERE  DEPT_NO  = E.DEPT_NO
                       AND    DEPT_CAT = 'A'   );
