dbTalk Databases Forums  

Triggers in scripts

comp.database.oracle comp.database.oracle


Discuss Triggers in scripts in the comp.database.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
No One
 
Posts: n/a

Default Triggers in scripts - 12-28-2005 , 06:46 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.

Reply With Quote
  #2  
Old   
No One
 
Posts: n/a

Default Re: Triggers in scripts - 12-29-2005 , 07:09 AM






Jørn Hansen wrote:
Quote:
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;
/

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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.