Re: Can i customize null-padding for outer joins?

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Shruthi A <shruthi(dot)iisc(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Can i customize null-padding for outer joins?
Date: 2009-10-01 06:22:28
Message-ID: dcc563d10909302322o14dca6ddv42641491d6e23cab@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thu, Oct 1, 2009 at 12:19 AM, Shruthi A <shruthi(dot)iisc(at)gmail(dot)com> wrote:
> Hello,
>
> I have a query where I full-outer-join 2 tables, and all the columns other
> than the join column are numerical columns. For my further calculations i
> need to pad the unmatched tuples with 0 (zero) instead of NULL so that I can
> perform meaningful mathematical calculations on them. Is this currently
> possible?

something like

select a.x, coalesce(b.y,0) from a left join b yada...

work?

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Scott Marlowe 2009-10-01 06:37:13 Re: Pg_Restore with --clean option
Previous Message Shruthi A 2009-10-01 06:19:53 Can i customize null-padding for outer joins?