Trigger problem!!! [message #37914] |
Wed, 06 March 2002 03:33 |
Sheryl
Messages: 6 Registered: November 2001
|
Junior Member |
|
|
Hello!
I encoutered the following problem : I have the following trigger :
create or replace trigger trig_date
before insert or update on spot_cost
for each row
begin
if :new.Valid_From > :new.Valid_to then
raise_Application_error(-20099,'Valid_To should be greater than Valid_From');
end if;
end;/
When an insertion such as the following occurs :
INSERT INTO spot_cost
(Show_name, Duration, Cost, Valid_From,Valid_To, Upd_by)
values ('60 minutes', '15', 2000,to_date('01-11-9999','DD-MM-YYYY '), to_date('02-12-2000','DD-MM-YYYY '), USER );
the trigger returns the following results:
ORA-20099: Valid_To should be greater than Valid_From
ORA-06512: at "GREEN.TRIG_DATE", line 4
ORA-04088: error during execution of trigger 'GREEN.TRIG_DATE'
The first error(ORA-20099) is ok, as I have specified it.What about the other two error messages;
What should I do;
thank you very much in advance, is quite urgent and I would appreciate any help
|
|
|
|