f



Triggers in scripts

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.
0
No
12/29/2005 12:46:03 AM
comp.database.oracle 721 articles. 0 followers. Post Follow

2 Replies
548 Views

Similar Articles

[PageSpeed] 25

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;
/

0
ISO
12/29/2005 12:49:11 PM
J�rn Hansen wrote:
> 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.
0
No
12/29/2005 1:09:18 PM
Reply: