Subject Re: [firebird-support] Re: Calc field displays blank if 1 field is blank
Author Alexandre Benson Smith
ra8009 wrote:

>When I try to use COALESCE it just gives me the last name when both
>the first name and last name exist. If both exist I want both. Is
>there a way to do this with COALESCE?
>
>
Coalesce can transform a null field in a empty string

Coalesce(LastName, '')

will do the job

if you want some more cosmetic you can use a case

Case
When (LastName is null) then FirstName
else
LastName || ', ' || FirstName
end


hth

--

Alexandre Benson Smith
Development
THOR Software e Comercial Ltda.
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br