Subject Re: [firebird-support] help with trigger
Author Pavel Menshchikov
Hello Sam,

d> Using the examples in Helen's book, I successfully created a generator
d> and trigger to create a unique "ID" on the BEFORE INSERT event for a
d> table. Now I need one a bit more complex.
d> This trigger should update the DISPLAY_NAME field in the CONSTITUENTS
d> table after update IF (for constituent type 1) the LAST_NAME,
d> FIRST_NAME, or MI FIELD has been changed by the user, or (for
d> constituent type 3) the BUSINESS_NAME has been chgd by the user. This
d> is what I have so far. Could some one fix this for me?
If you need to apply changes on a server side, perform it in BEFORE
UPDATE trigger, not in AFTER UPDATE.

d> The following script returns this error msg when I try to run it.
d> ===
d> ISC ERROR CODE:335544569
d> ISC ERROR MESSAGE:
d> Dynamic SQL Error
d> expression evaluation not supported
d> ===
Concatenate strings with double pipes (||) sign (SQL standard), not
with plus (+) sign.


--
HTH
Best regards,
Pavel Menshchikov
http://www.ls-software.com