Subject | SELECT returns nothing if one field is NULL |
---|---|
Author | rekkod |
Post date | 2005-08-12T05:56:18Z |
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
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