Re: Adding a null

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Adding a null
Date: 2009-11-05 18:28:41
Message-ID: 20091105182841.GV5407@samason.me.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Nov 05, 2009 at 10:13:28AM -0800, Bob Pawley wrote:
> However one variable sometimes returns a null value which invariably
> gives a null answer.
>
> How can I work around this??

What do you want it to do with the NULL value? I'm assuming you want to
use COALESCE, something like:

COALESCE(n,0) + COALESCE(m,0)

--
Sam http://samason.me.uk/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message ara.t.howard 2009-11-05 18:43:22 adding a custom tsearch parser
Previous Message Bob Pawley 2009-11-05 18:13:28 Adding a null