Re: math problem - Mailing list pgsql-general

From Stephan Szabo
Subject Re: math problem
Date
Msg-id 20020725152208.Q52747-100000@megazone23.bigpanda.com
Whole thread Raw
In response to math problem  (Vincent Stoessel <vincent@xaymaca.com>)
List pgsql-general
On Thu, 25 Jul 2002, Vincent Stoessel wrote:

> cola colb total
>
>       3
> 1
> 4
>
> etc.
>
>
>
> Any work around for this, do I have to use a
> Pg language? I guess I could write a script in perl
> to take of this for me but I would like to tap
> the brains here to see it can al be done in the
> SQL.

If you're trying to get 3, 1, and 4 respectively,
you might want:
coalesce(cola,0)+coalesce(colb,0)


pgsql-general by date:

Previous
From: Vincent Stoessel
Date:
Subject: math problem
Next
From: "Roderick A. Anderson"
Date:
Subject: Re: math problem