Subject | Re: [firebird-support] help with trigger |
---|---|
Author | Mitchell Peek |
Post date | 2005-06-29T21:47:03Z |
Sam Hunt wrote:
Sam, you will want to make sure that last_name, first_name, MI do not
allow nulls, or, write logic that handles those cases where one or more
are null.
if, for example,
new.Last_Name='BLAH';
new.First_Name=null;
then
[new.Last_name || new.First_name] is null
also, your if statements like....
IF ((OLD.LAST_NAME <> NEW.LAST_NAME)
OR (OLD.FIRST_NAME <> NEW.FIRST_NAME)
OR (OLD.MI <> NEW.MI)) THEN
may not work as you expect if any of the 6 are null.
Sam, you will want to make sure that last_name, first_name, MI do not
allow nulls, or, write logic that handles those cases where one or more
are null.
if, for example,
new.Last_Name='BLAH';
new.First_Name=null;
then
[new.Last_name || new.First_name] is null
also, your if statements like....
IF ((OLD.LAST_NAME <> NEW.LAST_NAME)
OR (OLD.FIRST_NAME <> NEW.FIRST_NAME)
OR (OLD.MI <> NEW.MI)) THEN
may not work as you expect if any of the 6 are null.
>Well... this trigger doesn't chg the display_name field when the[Non-text portions of this message have been removed]
>specified fields are edited and posted from the app.
>Just for kicks, I tried removing (saved my chgs to the trigger) for all
>of the conditions for constituent type 1, except the chg on last_name,
>then I chgd the last name and it still did not update the displa_name
>field, or maybe I should state more correctly that the display_name
>"looks" like it's blank.
>
>If anyone has any ideas, I'd be glad to try them.
>Thx
>Sam H.
>
>
>
>