Subject | Re: [firebird-support] Re: Calc field displays blank if 1 field is blank |
---|---|
Author | Alexandre Benson Smith |
Post date | 2004-08-02T20:47:03Z |
ra8009 wrote:
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
>When I try to use COALESCE it just gives me the last name when bothCoalesce can transform a null field in a empty string
>the first name and last name exist. If both exist I want both. Is
>there a way to do this with COALESCE?
>
>
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