Subject | Re: [firebird-support] help with trigger |
---|---|
Author | Sam Hunt |
Post date | 2005-06-29T21:52:37Z |
Mitchell Peek wrote:
I'll chk this out.
"With a little help from my friends I get by."
Thx
Sam H.
>Sam Hunt wrote:Makes sense.
>
>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
>>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.
>>
>>
>>
>>
>>
>>
>
>
>[Non-text portions of this message have been removed]
>
>
>
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>Visit http://firebird.sourceforge.net and click the Resources item
>on the main (top) menu. Try Knowledgebase and FAQ links !
>
>Also search the knowledgebases at http://www.ibphoenix.com
>
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
I'll chk this out.
"With a little help from my friends I get by."
Thx
Sam H.