Re: coalesce function

Поиск
Список
Период
Сортировка
От Leif Biberg Kristensen
Тема Re: coalesce function
Дата
Msg-id 5335073.HxcfRAuDfV@balapapa
обсуждение исходный текст
Ответ на coalesce function  (itishree sukla <itishree.sukla@gmail.com>)
Список pgsql-general
Torsdag 20. juni 2013 21.45.02 skrev itishree sukla:
> Hi All,
>
> I am using coalesce(firstname,lastname), to get the result if first name is
> 'NULL' it will give me lastname or either way. I am having data like
> instead of NULL,  blank null ( i mean something like '' ) for which
> coalesce is not working, is there any workaround or other function
> available in postgresql, please do let me know.

CASE WHEN firstname NOT IN (NULL, '') THEN firstname ELSE lastname END;

regards, Leif


В списке pgsql-general по дате отправления:

Предыдущее
От: Serge Fonville
Дата:
Сообщение: Re: coalesce function
Следующее
От: guilherme
Дата:
Сообщение: Exporting Data