Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2004
    Posts
    19

    Unanswered: Ora-01036 when creating a Trigger

    Hi all,

    I'm trying to create a new trigger in oracle. I use the sql editor from Toad to do so.
    I have the following code:

    CREATE OR REPLACE TRIGGER CAS_OWNER.TRG_INSURANCE
    BEFORE INSERT
    ON CAS_OWNER.VERZEKERINGEN
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    BEGIN
    SELECT INSURANCE_SEQ.nextval
    INTO :new.VERZEKERINGSID
    FROM dual;
    END;

    If I execute this statement than I get a new screen with Variables:
    Name : New
    Type Integer
    Value 2

    Whether I choose new, delete, oke or cancel it gives me than ORA-01036 Name/Number not valid.

    What do I do wrong?

    Many tahnkx in advanced

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Learn to use TOAD

    Do not execute this statement, but EXECUTE IS AS A SCRIPT (third button from the left, with two green triangles).
    Otherwise, it asks you to insert value for a variable you used in the query.

    P.S. If you executed this script through SQL*Plus, it would require additional slash ("/") at the end, but would execute with no errors.

  3. #3
    Join Date
    Dec 2004
    Posts
    19
    Yes you are right.

    But anyhow many thankx

    Regards,

    Jânio

Posting Permissions

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