Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have a statement in my trigger, l

Status
Not open for further replies.

FoxJunior

MIS
May 27, 2002
12
ID
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
 
What table do you use this trigger for? Does this table contain empno field that is already "trimmed"? Try to use
trim:)new.empno) = RTRIM(employee.empno)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top