469,609 Members | 1,852 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

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.nextval 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.nextval into :new.id from dual;
end;

Thanks,
Darren
Jul 19 '05 #1
1 4383
da***********@ericsson.com (Darren) wrote in message news:<7c**************************@posting.google. 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.nextval 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.nextval 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 --
Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Lauren Quantrell | last post: by
1 post views Thread by Barbara Lindsey | last post: by
reply views Thread by Yogesh | last post: by
1 post views Thread by sandi | last post: by
1 post views Thread by Darren | last post: by
3 posts views Thread by Andrea MF | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.