Re: CREATE TRIGGER with ERwin (CA)

From: Lennart Jonsson <lennart_at_kommunicera.umea.se>
Date: 18 Sep 2002 13:28:37 -0700
Message-ID: <6dae7e65.0209181228.4c2fca7_at_posting.google.com>


gianoele_at_netscape.net (Gianoele) wrote in message news:<69dad29a.0209180700.ff4bdb1_at_posting.google.com>...
> Hi,
>
> I'd like to create a Database using ERwin (3.5.2) everithing works
> fine, but when i try to execute the create trigger script a big error
> is generated.
>
> ERwin creates multiples triggers with a '!!' separator (double
> exclamation point),
>
> Ex:
>
> create trigger MYTRIGGER after UPDATE on MYTABLE
> REFERENCING OLD AS OLD NEW AS NEW for each row mode db2sql
> WHEN (((select count(*) from MYTABLE where new.FIELD1 =
> KMTECALI.FIELD2 and
> new.FIELD3 = KMTECALI.FIELD4) = 0)
> )
> SIGNAL SQLSTATE '42987' ('Cannot UPDATE KMTECFLU because
> KMTECALI does not exist.')
> !!
>
> What can i do to have a semicolumn as terminator?
>
> Thanks to all.
>
> Gianoele

Sorry for not remembering exactly (and I dont have access to Erwin at the moment), but you either change it in the trigger templates or in one of the macros. I know I changed a lot of trigger templates but the reason might have been that some of the default templates where wrong, and others I didnt like (for example I prefer the exists predicate instead of count(*) = 0)

/Lennart Received on Wed Sep 18 2002 - 22:28:37 CEST

Original text of this message