Re: concatenating with NULLs

Поиск
Список
Период
Сортировка
От Glen Parker
Тема Re: concatenating with NULLs
Дата
Msg-id 4DB5F5A6.6050107@nwlink.com
обсуждение исходный текст
Ответ на concatenating with NULLs  (Seb <spluque@gmail.com>)
Список pgsql-general
On 04/25/2011 02:13 PM, Seb wrote:
> A query such as:
>
> SELECT 'a' || 'b' || NULL;
>
> returns a NULL.  How can I ensure I get 'ab' in the result?  I'm trying
> to concatenate columns and one of them might have NULL values, which I
> simply want to ignore.


SELECT 'a' || 'b' || coalesce(NULL, '');


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

Предыдущее
От: "David Johnston"
Дата:
Сообщение: Re: concatenating with NULLs
Следующее
От: Phoenix Kiula
Дата:
Сообщение: Re: Help - corruption issue?