BEGIN

DECLARE
	V_COUNT NUMBER;
	BEGIN
	  V_COUNT := 0;
	  BEGIN
		 SELECT COUNT(*)
		   INTO V_COUNT
		   FROM USER_SCHEDULER_JOBS
		  WHERE JOB_NAME = 'JOB_REPLICA_VENDAS_RM';
	  EXCEPTION
		 WHEN NO_DATA_FOUND THEN
			V_COUNT := 0;
	  END;
	  IF V_COUNT > 0 THEN
		 DBMS_SCHEDULER.DROP_JOB(JOB_NAME => 'JOB_REPLICA_VENDAS_RM');
	  END IF;
	END;
END;

/