Subject | expression evaluation |
---|---|
Author | Lauri Zoova |
Post date | 2002-12-21T00:58:34Z |
Hi!
If i have an after(or before, does not matter) update trigger with the
following in it:
if new.field <> old.field then [do something that takes a long time and
needs to be done only when this field changes]
..it evaluates to false when old value is null.
This would solve it:
if ((new.field <> old.field) or ((new.field is not null) and (old.field
is null))) then ...
..but it's very inconvenient when i have more than one field in the
condition. I solved my problem (a while ago) in the client programm (had
4 fields). So this is not an active problem, but i'm just being curious.
This seems absurd. Is this a feature or a bug or does some standard say
that this is the way it should be?
Again - is there another way to do this?
(tested with fb1 & 1.5)
BR,
Lauri
(1 down 2 to go)
If i have an after(or before, does not matter) update trigger with the
following in it:
if new.field <> old.field then [do something that takes a long time and
needs to be done only when this field changes]
..it evaluates to false when old value is null.
This would solve it:
if ((new.field <> old.field) or ((new.field is not null) and (old.field
is null))) then ...
..but it's very inconvenient when i have more than one field in the
condition. I solved my problem (a while ago) in the client programm (had
4 fields). So this is not an active problem, but i'm just being curious.
This seems absurd. Is this a feature or a bug or does some standard say
that this is the way it should be?
Again - is there another way to do this?
(tested with fb1 & 1.5)
BR,
Lauri
(1 down 2 to go)