Subject | Re: [IBO] Refresh question |
---|---|
Author | Woody (TMW) |
Post date | 2004-12-10T01:59:14Z |
> Hi Woody,AS
>
> You are 100% right, I have just check my trigger definition:
>
>
> SET TERM ^^ ;
> CREATE TRIGGER T_AC_NEW_ID FOR ALARMCODES ACTIVE BEFORE INSERT POSITION 0
> BEGINGlad to help. This example, however, raises an intersting question for me. I
> IF( (new.AC_ID IS NULL) OR (new.AC_ID < 1) )THEN
> new.AC_ID = Gen_ID(GEN_AC_NEW_ID, 1);
> END
> ^^
> SET TERM ; ^^
>
> Thus, I think my problem must be in the application code.
could try it to find out but, could this test be restructured as:
IF (COALESCE(new.AC_ID, 0) < 1) then
new.AC_ID = Gen_ID(GEN_AC_NEW_ID, 1);
??
Woody (TMW)