Subject Re: [firebird-support] Concatenated field return null when only one field is null
Author Paul Vinkenoog
Hi Jason, Almond,

> Select Coalesce(PA_COLOR_GROUP_CODE, '') || ' ' ||
> Coalesce(PA_COLOR_CUST_REF, '')...

Coalesce is not available in 1.0 though. But if Almond uses the
Windows version, he can use the *NVL functions from the fbudf lib.
More info here:
http://www.firebirdsql.org/manual/nullguide-dealing-with-nulls.html#nullguide-subst-with-value

> That will get you what you want, most likely. You can not (at least you
> shouldn't be able to) do operations on a NULL field. NULL does NOT mean
> "Has a value of nothing", but rather "Has no value". With that, this
> behavior should make more sense.

For me, the best way to make sense of NULL behaviour is to read
it as UNKNOWN. If PA_COLOR_CUST_REF is unknown, then clearly the
concatenation of PA_COLOR_GROUP_CODE and PA_COLOR_CUST_REF is also
unknown.


Greetings,
Paul Vinkenoog