Search Postgresql Archives

Re: Replace NULL values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment: signature.asc
Description: Digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux