X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 825F2475843 for ; Wed, 19 Feb 2003 13:12:24 -0500 (EST) Received: from anchor-post-39.mail.demon.net (anchor-post-39.mail.demon.net [194.217.242.80]) by postgresql.org (Postfix) with ESMTP id F0EE647580B for ; Wed, 19 Feb 2003 13:12:23 -0500 (EST) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-39.mail.demon.net with esmtp (Exim 3.36 #2) id 18lYhi-0006zc-0d; Wed, 19 Feb 2003 18:12:23 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id 5A49A175F0; Wed, 19 Feb 2003 18:10:55 +0000 (GMT) Received: from client.archonet.com (client.archonet.com [192.168.1.16]) by mainbox.archonet.com (Postfix) with ESMTP id BDA7616BD4; Wed, 19 Feb 2003 18:10:54 +0000 (GMT) Content-Type: text/plain; charset="iso-8859-1" From: Richard Huxton Organization: Archonet Ltd To: Stephen.Thompson@bmwfin.com, pgsql-sql@postgresql.org Subject: Re: VIEW or Stored Proc - Is this even possible? Date: Wed, 19 Feb 2003 18:10:50 +0000 User-Agent: KMail/1.4.3 References: <3D6DE68CE505D311B2540020482D02530BE2C5B5@EXCHANGESRV> In-Reply-To: <3D6DE68CE505D311B2540020482D02530BE2C5B5@EXCHANGESRV> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200302191810.51330.dev@archonet.com> X-Virus-Scanned: by AMaViS snapshot-20020531 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/431 X-Sequence-Number: 11829 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 =3D 'A' > B =3D NULL > C =3D NULL > D =3D 'D' > E =3D '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=20 techdocs.postgresql.org about them). Don't suppose you could give more of an explanation - it sounds like an odd= =20 thing to do. --=20 Richard Huxton