Oracle warning: execution ended with warning

I have two tables

Orders(ID,ORDERDATE,DELIVERYDATE,GOODID,QUANTITY,COLLECTIONFROM,DELIVERYTO,NOTES)

      

and

ROLLINGSTOCK_ORDER(ORDERID,ROLLINGSTOCKID,DEPARTUREDATE,DELIVERYDATE,ROUTEID)

      

I created a trigger to update DELIVERYDATE at ROLLINGSTOCK_ORDER

when DELIVERYDATE is updated atOrders

CREATE OR REPLACE TRIGGER TRIGGER_UpdateDeliveryDate
BEFORE UPDATE OF DELIVERYDATE ON Orders 
FOR EACH ROW 
BEGIN    
then
   UPDATE LOCOMOTIVE_DRIVER ld
   set ld.DELIVERYDATE = :new.DELIVERYDATE
   where ld.orderid = :new.id
end if;
END;

      

When I run it I get the following message

Warning: Executed with warning TRIGGER TRIGGER_UpdateDeliveryDate was compiled.

The warning doesn't give me any information, so

  • How can I find out the details of the warning?

  • The trigger seems convenient to me, can you identify the problem?

thanks

+2


a source to share


2 answers


Earlier this week, you asked a question about writing a trigger to perform a conditional update. I have posted two examples of how to achieve this goal . What you seem to have done is wash two examples into one triggered trigger that doesn't compile.

To be clear, you only need one of the following. Or

BEFORE UPDATE OF DELIVERYDATE ON Orders

      



or

 BEFORE UPDATE ON Orders 
 ... 
    if :new.delivery_date != :old.delivery_date then

      

Use the first option if you only have one piece of logic. Use the second version if you want your trigger to handle other pieces of logic as well, which usually happens.

0


a source


You write

BEGIN    
then

      

which is incorrect syntax. Are you missing IF

?

You are also missing the semicolon ( ;

) after UPDATE

.




You can get error using

Show Error Trigger TRIGGER_UpdateDeliveryDate

      

0


a source







All Articles