Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Silly SQL-Plus Worksheet questions...
try inserting a
/
after the
end;
Create or replace trigger my_ins_trigger
before insert on my_schema.table_name for each row
begin
:new.field_id = user;
:new.field_date = sysdate;
end;
/
create or replace trigger my_upd_trigger
before update on my_schema.table_name for each row
begin
:new.field_upd_id = user;
:new.field_upd_date = sysdate;
end;
/
-- be happy Eugenio remove _nospam from reply address Opinions are mine and do not necessarily reflect those of my company ======================================================= sgcummings_at_my-deja.com wrote in message <8kflu0$t80$1_at_nnrp1.deja.com>...Received on Wed Jul 12 2000 - 00:00:00 CDT
>This is a silly question, but I can't seem to figure out the solution.
>
>I want to have a script file that I can run from the Worksheet that
>will create all my triggers. So I've created a file containing for
>example:
>
>Create or replace trigger my_ins_trigger
> before insert on my_schema.table_name for each row
>begin
> :new.field_id = user;
> :new.field_date = sysdate;
>end;
>
>create or replace trigger my_upd_trigger
> before update on my_schema.table_name for each row
>begin
> :new.field_upd_id = user;
> :new.field_upd_date = sysdate;
>end;
>
>When I run this manually through the worksheet, it only creates one
>trigger with compilation errors! What do I need to do to indicate that
>there are TWO create trigger commands here?
>
>Thanks for the help.
>
>Looking foolishly yours,
>Steve Cummings
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
![]() |
![]() |