Home > Archive > Oracle Databases > December 2005 > Triggers in scripts









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Triggers in scripts
No One

2005-12-28, 8:26 pm

I have a SQL script that creates tables, sequences, indices and even
inserts some data. Typically it is run by copy/paste into TOAD. A need
has arisen to create a few triggers. If I put the trigger code in this
script, all code following the trigger gets interpretted as being part
of the trigger. Do I need to create a script for every trigger or is
there a way to include them all in this one script? The client is
running Oracle 9i.

Thanks.
Jørn Hansen

2005-12-29, 7:25 am

No One wrote:
> I have a SQL script that creates tables, sequences, indices and even
> inserts some data. Typically it is run by copy/paste into TOAD. A need
> has arisen to create a few triggers. If I put the trigger code in this
> script, all code following the trigger gets interpretted as being part
> of the trigger. Do I need to create a script for every trigger or is
> there a way to include them all in this one script? The client is
> running Oracle 9i.
>
> Thanks.

Usually - you should end your code with a '/' on a single line.

Example:

CREATE TRIGGER ...
....
END;
/

No One

2005-12-29, 7:25 am

Jørn Hansen wrote:
> No One wrote:
>
>
> Usually - you should end your code with a '/' on a single line.
>
> Example:
>
> CREATE TRIGGER ...
> ...
> END;
> /
>


I tried that, but it didn't seem to work. I will try again though.
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com