Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to End PL/SQL-Code in SQL
In article <3496991A.8482FF40_at_bitoek.uni-bayreuth.de>,
Helmut Hahn <Helmut.Hahn_at_bitoek.uni-bayreuth.de> wrote:
>
> Hallo,
>
> I want to create some triggers out of a file. The Problem is that after
> 'CREATE TRIGGER' the whole script belongs to the first trigger.
> What magic sign must I put in the script to make SQL see all CREATE
> TRIGGER staements? As example I would like do run
> the script
>
> CREATE TRIGGER "VERW"."NEWADRTYPID" BEFORE INSERT ON
> "VERW"."VERW_ADRESS_TYPEN_LISTE" REFERENCING OLD AS OLD NEW AS NEW FOR
> EACH ROW WHEN (NEW.ADRTYP_ID IS NULL) BEGIN
> select SEQ_ADRESS_TYPEN_LISTE.NextVal into :new.ADRTYP_ID from dual;
> END;
>
> CREATE TRIGGER "VERW"."NEWADRTYPID2" BEFORE INSERT ON
> "VERW"."VERW_ADRESS_TYPEN_LISTE2" REFERENCING OLD AS OLD NEW AS NEW FOR
> EACH ROW WHEN (NEW.ADRTYP_ID IS NULL) BEGIN
> select SEQ_ADRESS_TYPEN_LISTE2.NextVal into :new.ADRTYP_ID from dual;
>
> END;
>
> Please help me!
Hi Helmut,
You just have to put a '/' caracter after each trigger declaration statement this will flush the buffer and sqlplus will process the statement. Your code would look like this:
CREATE TRIGGER...
<< trigger body>>
end;
/
CREATE TRIGGER...
end;
/
Hope this is what you were looking for.
-------------------==== Posted via Deja News ====----------------------- http://www.dejanews.com/ Search, Read, Post to UsenetReceived on Tue Dec 16 1997 - 00:00:00 CST