Re: math problem

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Vincent Stoessel <vincent(at)xaymaca(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: math problem
Date: 2002-07-25 22:23:58
Message-ID: 20020725152208.Q52747-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Roderick A. Anderson 2002-07-25 22:24:17 Re: math problem
Previous Message Vincent Stoessel 2002-07-25 22:12:14 math problem