Re: VIEW or Stored Proc - Is this even possible? - Mailing list pgsql-sql

From Richard Huxton
Subject Re: VIEW or Stored Proc - Is this even possible?
Date
Msg-id 200302191810.51330.dev@archonet.com
Whole thread Raw
In response to VIEW or Stored Proc - Is this even possible?  (Stephen.Thompson@bmwfin.com)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: once again, sorting with Unicode
Next
From: Guy Fraser
Date:
Subject: Re: Passing arrays