Subject | Re: AW: [firebird-support] trigger in firebird 2.1.1 |
---|---|
Author | Thomas Steinmaurer |
Post date | 2011-03-24T10:47:12Z |
> I'm sorry, my mistake.Yeah, my crystal ball strikes back. ;-)
>
> One condition makes me trouble with NULL as you thought. The "Bemerkung" -
> comment-field was set to null as default value. Now, I change the value and
> old.value<> new.value doesn't work, because the old value is NULL. After I
> change the value again, it works.
> Now, I have added the follow condition:As previously mentioned, use the IS DISTINCT FROM clause.
>
> If(old.comment<>new.comment) or ((old.comment is null)and(new.comment is not
> null))
>
> Is there a better way to compare?
IF (old.comment IS DISTINCT FROM new.comment) THEN
BEGIN
...
END
Thomas