Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread computed field doesn't work with null
Mon, Sep 7 2009 10:20 AMPermanent Link

Van de moortel, Koen
I defined a computed varchar field (Name) in EDBManager2 as the concatenation of 2 varchar fields FName and LName (C=A+' '+B).
All three of them are nullable, and yet, if A or B is null, Name is not calculated.
Why???
Or how can this be circumvented?
Mon, Sep 7 2009 11:05 AMPermanent Link

Uli Becker
Van de moortel,

> I defined a computed varchar field (Name) in EDBManager2 as the concatenation of 2 varchar fields FName and LName (C=A+' '+B).
> All three of them are nullable, and yet, if A or B is null, Name is not calculated.
> Why???
> Or how can this be circumvented?

This behaviour is like expected. To avoid it, use the Colalesce-function:

Select Coalesce(FName,'') + Coalesce(LName, '') from mytable.

http://www.elevatesoft.com/manual?action=mantopic&id=edb2sql&category=20&topic=452

Uli
Tue, Sep 8 2009 4:49 AMPermanent Link

Van de moortel, Koen
Thanks
Image