pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Stephen.Thompson@bmwfin.com
To: pgsql-sql@postgresql.org
Subject: Re: VIEW or Stored Proc - Is this even possible?
Date: Wed, 19 Feb 2003 18:10:50 +0000
Message-ID: <200302191810.51330.dev@archonet.com> (raw)
In-Reply-To: <3D6DE68CE505D311B2540020482D02530BE2C5B5@EXCHANGESRV>
References: <3D6DE68CE505D311B2540020482D02530BE2C5B5@EXCHANGESRV>

On Wednesday 19 Feb 2003 12:56 pm, Stephen.Thompson@bmwfin.com wrote:
> I have a table with fields A, B, C, D and E. Any of these can contain
> nulls. What I need to do is to be able to perform a select that removes
> nulls.
>
> if A = 'A'
>   B = NULL
>   C = NULL
>   D = 'D'
>   E = 'E'
>
> what I would like returned is
>
> A, D, E, NULL, NULL.

You could do this in 7.3 with table functions (there's a good article on 
techdocs.postgresql.org about them).

Don't suppose you could give more of an explanation - it sounds like an odd 
thing to do.

-- 
  Richard Huxton



view thread (5+ messages)  latest in thread

Message-ID: <200302191810.51330.dev@archonet.com>
Permalink:  ../200302191810.51330.dev@archonet.com/
Also on:    postgresql.org/message-id/200302191810.51330.dev@archonet.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: dev@archonet.com, Stephen.Thompson@bmwfin.com
  Subject: Re: VIEW or Stored Proc - Is this even possible?
  In-Reply-To: <200302191810.51330.dev@archonet.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