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: create trigger statement in sqlplus

Re: create trigger statement in sqlplus

From: Xavier Neys <neysx_at_xs4all.nl>
Date: Wed, 10 Oct 2001 10:21:43 +0200
Message-ID: <9q118v$sk4$1@news1.xs4all.nl>


Hallo Axel,

Type a single / <ENTER> to SQL*Plus know your statement is over.

It becomes

CREATE TRIGGER "TID_ASSIGN" BEFORE INSERT ON "T_TIJDSCHRIFTEN"    FOR EACH ROW
   BEGIN
     SELECT TID_SEQ.NEXTVAL INTO :NEW.TID FROM DUAL;    END;
/

Succes.

HTH

--
Today, Tomorrow, Together
The DOC
(The Dutch Oracle Company)
www.thedoc.nl
Xavier Neys




"Axel Hallez" <Axel.Hallez_at_rug.ac.be> wrote in message news:9q0vl9$bm8$1_at_inf6serv.rug.ac.be...

> Hello all,
>
> I am writing a script to generate a small database which will be used in SQL
> exercises.
> This script includes some triggers like this:
> CREATE TRIGGER "TID_ASSIGN" BEFORE INSERT ON "T_TIJDSCHRIFTEN"
> FOR EACH ROW
> BEGIN
> SELECT TID_SEQ.NEXTVAL INTO :NEW.TID FROM DUAL;
> END;
>
> The problem is that sqlplus does not recognise the end of this statement, so
> it remains waiting for the rest of the statement or it reads the rest of the
> script as a part of this statement.
>
> Does anybody know a workaround for this problem?
>
> Thanks in advance,
>
> Axel Hallez
>
> Computer Science Laboratory
> University of Ghent, Belgium
>
>
Received on Wed Oct 10 2001 - 03:21:43 CDT

Original text of this message

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