Re: VIEW or Stored Proc - Is this even possible?

From: Richard Huxton <dev(at)archonet(dot)com>
To: Stephen(dot)Thompson(at)bmwfin(dot)com, pgsql-sql(at)postgresql(dot)org
Subject: Re: VIEW or Stored Proc - Is this even possible?
Date: 2003-02-19 18:10:50
Message-ID: 200302191810.51330.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Wednesday 19 Feb 2003 12:56 pm, Stephen(dot)Thompson(at)bmwfin(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Matthew Nuzum 2003-02-19 18:51:58 simple join problem
Previous Message Bruno Wolff III 2003-02-19 15:22:57 Re: Default column titles in a select...