CREATE TRIGGER odditiy

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Darren

    CREATE TRIGGER odditiy

    Hello,

    I have some 'CREATE TRIGGER' definitions that work when cut/pasted
    into SQL*Plus worksheet and execute separately but fail with a
    'trigger created with compilation errors' when executed at the same
    time. Neither works at all under Solaris sqlplus.

    Does anyone see what the problem is?

    create or replace trigger aut_itri
    before insert on inbound
    for each row
    when (new.id is null)
    begin
    select auto_iseq.nextv al into :new.id from dual;
    end;

    create or replace trigger aut_otri
    before insert on outbound
    for each row
    when (new.id is null)
    begin
    select auto_oseq.nextv al into :new.id from dual;
    end;

    Thanks,
    Darren
  • Mark D Powell

    #2
    Re: CREATE TRIGGER odditiy

    darren.kinley@e ricsson.com (Darren) wrote in message news:<7ceafac1. 0312101120.4cef da96@posting.go ogle.com>...
    Hello,
    >
    I have some 'CREATE TRIGGER' definitions that work when cut/pasted
    into SQL*Plus worksheet and execute separately but fail with a
    'trigger created with compilation errors' when executed at the same
    time. Neither works at all under Solaris sqlplus.
    >
    Does anyone see what the problem is?
    >
    create or replace trigger aut_itri
    before insert on inbound
    for each row
    when (new.id is null)
    begin
    select auto_iseq.nextv al into :new.id from dual;
    end;
    >
    create or replace trigger aut_otri
    before insert on outbound
    for each row
    when (new.id is null)
    begin
    select auto_oseq.nextv al into :new.id from dual;
    end;
    >
    Thanks,
    Darren
    Darren, the triggers are written in pl/sql and pl/sql contains
    semicolons, which would normally end an SQL statement.

    To execute the create trigger place a slahs, "/", in the first column
    on the line immediately following each trigger definition.

    HTH -- Mark D Powell --

    Comment

    Working...