pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <scott.marlowe@gmail.com>
To: Shruthi A <shruthi.iisc@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Can i customize null-padding for outer joins?
Date: Thu, 1 Oct 2009 00:22:28 -0600
Message-ID: <dcc563d10909302322o14dca6ddv42641491d6e23cab@mail.gmail.com> (raw)
In-Reply-To: <6caee9520909302319w638c4feara4ead3402e5e00c0@mail.gmail.com>
References: <6caee9520909302319w638c4feara4ead3402e5e00c0@mail.gmail.com>

On Thu, Oct 1, 2009 at 12:19 AM, Shruthi A <shruthi.iisc@gmail.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?



view thread (3+ messages)  latest in thread

Message-ID: <dcc563d10909302322o14dca6ddv42641491d6e23cab@mail.gmail.com>
Permalink:  ../dcc563d10909302322o14dca6ddv42641491d6e23cab@mail.gmail.com/
Also on:    postgresql.org/message-id/dcc563d10909302322o14dca6ddv42641491d6e23cab@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: scott.marlowe@gmail.com, shruthi.iisc@gmail.com
  Subject: Re: Can i customize null-padding for outer joins?
  In-Reply-To: <dcc563d10909302322o14dca6ddv42641491d6e23cab@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox