Toad World® Forums

DDL Script Generator - Create Trigger problem


#1

(TDM 3.5.5.5)

Hi,

When the script is generated using the DDL Script Generator, the trigger sections being created adds an extra semi-colon after the “END;” of the create trigger statement. The TOAD for Oracle manager does not like running this script then without first removing the extra semi-colons.

Best Regards
Rudi


#2

Hi,

I just found that creating Procedures does exactly the same thing.

Regards,
Rudi


#3

Hi Rudi,

We will think about it.
Nevertheless, we’d like to note that we think it is not a good idea to use ‘;’ for terminator for objects such as trigger or procedure.
SQLPlus can have a problem with this and e.g. Oracle SQL Developer adds a row CREATE INDEX as part of trigger “Trigger1” when you launch it:

CREATE TRIGGER “SCOTT”.“Trigger1”
BEFORE DELETE OR INSERT
ON “SCOTT”.“EntitaChild”
REFERENCING OLD AS OLD NEW AS NEW
BEGIN
RAISE_APPLICATION_ERROR (
num => -20000,
msg => ‘Cannot drop object’);
END;

CREATE INDEX “SCOTT”.“Index3” ON “SCOTT”.“EntitaChild” (“TriggerAtt”) ;

Regards,

Vladka + Mario


#4

Hi Vladka

I’ve changed my terminator to rather for this, it does make more sense that way.

Thanks again for all the assistance.

Best Regards
Rudi