CREATE OR REPLACE PROCEDURE PCCP0A_DEL_KQ0 (VC_PNR IN VARCHAR2) IS
  R     NUMBER;
BEGIN
  SELECT COUNT(*) INTO R FROM KJ1.KJ1P0PER WHERE PERSONNR = VC_PNR;
  IF R = 0 THEN
    DELETE FROM PCC.PCCV0A WHERE PNR = VC_PNR;
  END IF;	
END; 
/;