Subject RE: [firebird-support] SELECT returns nothing if one field is NULL
Author Alan McDonald
> HI All
>
> How can I get a row if a field is NULL in the following SELECT.
>
> select
> receivables.FIRST_NAME + ' ' + receivables.LAST_NAME as GUEST_NAME
> from
> receivables
> where
> last_name like 'SHIVAMB%'
>
>
> If FIRST_NAME or LAST_NAME is NULL nothing gets returned. Is there a
> way of specifying that if FIRST_NAME is NULL to return an empty string
> in one SELECT and concatenating the fields.
>
> Thanks
> Anton

COALSECE(FIRST_NAME, '')
Alan