Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2002
    Location
    San Francisco, CA
    Posts
    441

    Unanswered: Help: Cannot create trigger

    I am stuck with the exact same error as this person, the code I am using is as follows:
    Code:
    CREATE OR REPLACE TRIGGER "FYP"."TEST" BEFORE
    INSERT ON "FYP"."JOBS" 
        FOR EACH ROW begin
      select seq_jobs.nextval into :new.id from dual;
    end;
    sequence named seq_jobs exists.

    The table named exists too and the code is as follows:
    Code:
    CREATE TABLE "FYP"."JOBS" ("ID" NUMBER(10), "ALARM_TEXT" 
        VARCHAR2(255 byte), "POINT_ID" NUMBER(10), "DATE" DATE, "PRORITY" 
        NUMBER(10))  
        TABLESPACE "FYP" PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 
        255 
        STORAGE ( INITIAL 64K NEXT 0K MINEXTENTS 1 MAXEXTENTS 
        2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1) 
        PARALLEL ( DEGREE DEFAULT ) 
        LOGGING
    This is really annoying: I cannot see the forward reference in the code: I don't see anything referenced apart from the table, the colum ID and the sequence...

  2. #2
    Join Date
    Nov 2002
    Location
    Desk, slightly south of keyboard
    Posts
    697
    Hi Russell,

    You have a column named DATE of type DATE. I've just tried it here and could not compile a trigger on such a table. I changed the name of the DATE column to a non-reserved word and it was fine.

    HTH
    Bill

  3. #3
    Join Date
    Feb 2002
    Location
    San Francisco, CA
    Posts
    441
    stareing me in the face

    Thanx again! Don't know what I would do with out you lot!!! lol.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •