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 -> Re: How to End PL/SQL-Code in SQL

Re: How to End PL/SQL-Code in SQL

From: <agaldo_at_bbvnet.com>
Date: 1997/12/16
Message-ID: <882311034.302776324@dejanews.com>#1/1

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.



Antonio Galdo
-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet
Received on Tue Dec 16 1997 - 00:00:00 CST

Original text of this message

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