| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Warning while creating trigger..
Could you look at the user_errors view after creation. The reason for the error
should be there.
I don't see any obvious being wrong though.
Hth,
Sybrand Bakker, Oracle DBA
broker2000_at_my-dejanews.com wrote:
> Hi,
>
> I am trying to create the following trigger on Oracle 8 database. The database
> and the client are running on WinNT 4.0.
>
> I need to compare dates in the trigger. What is the right way to do this? The
> first trigger works but the second listed does not. The second generates a
> warning "MGR-00073 TRIGGER created with compilation errors".
>
> # Works without warnings
> CREATE OR REPLACE TRIGGER "USER".TRG_TEST
> AFTER INSERT ON "USER"."TEST2"
> REFERENCING OLD AS OLD NEW AS NEW
> FOR EACH ROW
> DECLARE
> OLD_DATE DATE;
> BEGIN
> SELECT FDATETIME INTO OLD_DATE FROM TEST WHERE FID = :NEW.FID;
> UPDATE TEST SET FDATETIME = :NEW.FDATETIME WHERE FID = :NEW.FID;
> END;
>
> # Generates a warning
> CREATE OR REPLACE TRIGGER "USER".TRG_TEST
> AFTER INSERT ON "USER"."TEST2"
> REFERENCING OLD AS OLD NEW AS NEW
> FOR EACH ROW
> DECLARE
> OLD_DATE DATE;
> BEGIN
> SELECT FDATETIME INTO OLD_DATE FROM TEST WHERE FID = :NEW.FID;
> IF OLD_DATE < :NEW.FDATETIME THEN
> UPDATE TEST SET FDATETIME = :NEW.FDATETIME WHERE FID = :NEW.FID;
> END IF;
> END;
>
> I tried looking up the error code but could not find MGR-00073 anywhere in the
> documentation. Anybody know what the problem could be? Any pointers are much
> appreciated. Thanks and have a nice day.
>
> Sincerely,
> Broker2000
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Received on Wed Mar 17 1999 - 23:48:39 CST
![]() |
![]() |