Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> How do I terminate a trigger declaration in an SQL file?

How do I terminate a trigger declaration in an SQL file?

From: kev <kevin.porter_at_fast.no>
Date: Tue, 03 Aug 1999 19:13:11 +0100
Message-ID: <37A73137.A6AD4175@fast.no>


The subject says it really.

If I have a section of code in a .sql file, for example:

--start code----------

create or replace trigger trig1
before insert on webtab1
for each row
begin

   select seq1.nextval
   into :new.id
   from dual;
end;

commit;
--end code------------

then I run the code in svrmgrl:

SVRMGR> @create_demo.sql

I get this error:

MGR-00072: Warning: TRIGGER TRIG1 created with compilation errors.

Then if I do a 'show errors' I get:

Errors for TRIGGER TRIG1:
LINE/COL ERROR
--------------------------------------------------------------------------------5/1
PLS-00103: Encountered the symbol "COMMIT"

So, how do I terminate the create trigger function?

Thanks,

Received on Tue Aug 03 1999 - 13:13:11 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US