Subject Re: [ib-support] string concatination, triggers
Author Nando Dessena
Helen,

> >If I define a computed column like the one in documents:
> >full_name computed by (first_name || ' ' || last_name)
> >It works only if non of the two composing columns is null. Otherwise, the
> >value is null if any of the two is null.
>
> Correct. Value + NULL evaluates to false.

As a matter of fact, Value + NULL evaluates to NULL.
I guess you meant that.

> >Is there any way to make it without
> >the need to write additional code like the stuff: if (first_name is null)
> >then full_name = last_name else...
>
> No, you will need procedure logic to achieve it, until Ann H. writes our NULLIF() function into Firebird. :)

shouldn't that be COALESCE?

> >Can a trigger be defined to "trigger" at different events. I mean is there a
> >way to make the following work:
> >create trigger my_trigger for my_table
> >before insert or update as
> > begin
> >
> > end
>
> No. You need to define each trigger separately.

...one of the (few) things I like about Oracle.
Maybe we should consider that for the wishlist...
--
____
_/\/ando