Re: Replace NULL values

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Replace NULL values
Дата
Msg-id 20060907094714.GD10093@svana.org
обсуждение исходный текст
Ответ на Replace NULL values  (Stefan Schwarzer <stefan.schwarzer@grid.unep.ch>)
Ответы Re: Replace NULL values  (Stefan Schwarzer <stefan.schwarzer@grid.unep.ch>)
Список pgsql-general
On Thu, Sep 07, 2006 at 07:45:19AM +0200, Stefan Schwarzer wrote:
> Hi there,
>
> is there a simple way to replace NULL values in multiple columns
> within the SQL statement? I changed the underlaying country template
> of your database; so now there are a couple of NULL values when I
> join the stats-table with the country table. Unfortunately, my
> queries have always multiple (year) columns, so I can't do a kind of
> manual replace.
>
> I found that the COALESCE command does something like this, but I
> couldn't figure out how this works.

Yes, COALESCE replaces NULLs, however your examples have neither NULLs
nor use COALESCE, so I don't understand what your question is.

Please repost with an actual example of your problem.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

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

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Re: Problems with sequences
Следующее
От: Stefan Schwarzer
Дата:
Сообщение: Re: Replace NULL values