I have a statement in my trigger, like this:
select count(*) into numrows
from EMPLOYEE
where
:new.empno = RTRIM(employee.empno);
if new.empno is not null and
numrows = 0)
then
raise_application_error(
-20002,
'Cannot INSERT WHRECVH because Employee does not exist.'
);
end if;
This trigger always run that function (raise_application_error). But if i check, my employee table is not empty.
Do you know how can exlain it to me? please...!
Thank's
select count(*) into numrows
from EMPLOYEE
where
:new.empno = RTRIM(employee.empno);
if new.empno is not null and
numrows = 0)
then
raise_application_error(
-20002,
'Cannot INSERT WHRECVH because Employee does not exist.'
);
end if;
This trigger always run that function (raise_application_error). But if i check, my employee table is not empty.
Do you know how can exlain it to me? please...!
Thank's