1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

what is wrong in this trigger?

Discussion in 'General' started by monkey, Apr 23, 2014.

  1. monkey

    monkey Long Term Member

    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    230
    Hello!
    Please, does somone see what is wrong in this trigger?
    Code (SQL):
    CREATE TRIGGER t1 after UPDATE OF msurname ON m FOR each ROW WHEN(OLD.surname='AAA')
    BEGIN
    :NEW.mname='trigger1';
    END t1;[
     
    The reported erorr is:

    pls_00103

    encountered the symbol "=" when expectiong one of the following:

    : = . ( @ % ; indicator

    Please, how to fix it?
    What is ment under "indicators"?
    Many thanks!!!
     
  2. krasnoslobodtsev_si

    krasnoslobodtsev_si Forum Genius

    Messages:
    626
    Likes Received:
    129
    Trophy Points:
    810
    Location:
    Russian Federation
    Hi.

    Pay attention ...
    Code (SQL):



    CREATE TRIGGER t1 after UPDATE OF msurname ON m FOR each ROW WHEN(OLD.surname='AAA')
    BEGIN
       -- You can not update the :NEW values. if trigger after
       --:NEW.mname='trigger1';
       NULL;
    END t1;
    /