Code of trigger not working

Discussion in 'Oracle' started by carox, Dec 14, 2007.

  1. carox

    carox New Member

    Joined:
    Nov 22, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Can anyone help me in finding whay the below code is not working. It says "invalid character"
    It is a trigger on table teacher that restricts from updating and deleting of the records on weekends.
    Code:
    CREATE OR REPLACE TRIGGER NOT_WORKING _HOUR 
    BEFORE INSERT OR DELETE OR UPDATE ON TEACHER 
    
    BEGIN 
    IF (TO_CHAR(SYSDATE,'DY') IN ('SAT','SUN')) THEN 
    DBMS_OUTPUT.PUT_LINE('SORRY! YOU CANNOT UPDATE OR DELETE ON WEEKENDS'); 
    END IF; 
    END
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Your name of the trigger contains a space.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice