Re: Replace null values

Поиск
Список
Период
Сортировка
От Nilesh Govindarajan
Тема Re: Replace null values
Дата
Msg-id 4BA845F4.5030506@itech7.com
обсуждение исходный текст
Ответ на Re: Replace null values  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general
On 03/23/2010 10:07 AM, John R Pierce wrote:
> Nilesh Govindarajan wrote:
>> Hi,
>>
>> In my query, some rows have null values (length 0).
>
> a NULL value is not length 0, NULL is not the empty string, rather, NULL
> is no value at all.
>
> if you want to change a 0 length string to something, use a CASE or
> something.
>
> select CASE WHEN u.name = '' THEN 'anon' ELSE u.name, ....
>
>
>
>
>

Thanks a lot ! It worked :)

--
Nilesh Govindarajan
Site & Server Administrator
www.itech7.com

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

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: Replace null values
Следующее
От: Nilesh Govindarajan
Дата:
Сообщение: Re: Replace null values