I try break process after exception is true . when exception is caught it will rollback and stop but i dont know that how to exit . i read concept apex_application.stop_apex_engine; but i confused with how to using
I input deptno > table dept checkdata if not > exception is caught > it wont run Process insert into dept(deptno,dname) values (71,'TEST') ;
this my code
DECLARE
xtest number:=null;
BEGIN
SAVEPOINT A;
adjust_insert
(SEQ_EMP.nextval, :TF_EMP_NAME, :DP_DATE, :RG_JOB, :NF_SALARY,:PL_MANAGER,:NF_COM,:SL_DEPT);
insert into x1 (c2) values ('insert emp success');
begin --Sub-block begin
select deptno into xtest from dept
where deptno=:P2_NEW;
EXCEPTION
WHEN NO_DATA_FOUND THEN
ROLLBACK to SAVEPOINT A; insert into x1 (c2) values ('nodatafound &rollbCK'); --I want to stop process if not found data
WHEN others THEN --Rollback all the changes and then raise the error again.
ROLLBACK to SAVEPOINT A; insert into x1(c2) values ('other&rollbCK'); --- TO A;
end; --Sub-block end
insert into dept(deptno,dname) values (71,'TEST');
END;