Re: CASE/WHEN behavior with NULLS - Mailing list pgsql-general

From Chris Angelico
Subject Re: CASE/WHEN behavior with NULLS
Date
Msg-id CAPTjJmpTfNYiWfLn=Nba80HwqVdEuWxTEsb-4my=nCgt_AAbfw@mail.gmail.com
Whole thread Raw
In response to Re: CASE/WHEN behavior with NULLS  (David Johnston <polobo@yahoo.com>)
List pgsql-general
On Sat, Sep 1, 2012 at 12:07 PM, David Johnston <polobo@yahoo.com> wrote:
> These are not equivalent if some values of foo are not-null and you want the sum of all non-null values while
replacingany nulls with zero.  So the decision depends on what and why you are summing. 

It comes to the same result with SUM though isn't it?

ChrisA


pgsql-general by date:

Previous
From: David Johnston
Date:
Subject: Re: CASE/WHEN behavior with NULLS
Next
From: Tom Lane
Date:
Subject: Re: CASE/WHEN behavior with NULLS