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

From Stephen.Thompson@bmwfin.com
Subject VIEW or Stored Proc - Is this even possible?
Date
Msg-id 3D6DE68CE505D311B2540020482D02530BE2C5B5@EXCHANGESRV
Whole thread Raw
Responses Re: VIEW or Stored Proc - Is this even possible?  (Richard Huxton <dev@archonet.com>)
List pgsql-sql
Hello All,

I am wondering if this is possible and how.

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. 

EG:

if A = 'A' B = NULL C = NULL D = 'D' E = 'E'

what I would like returned is 

A, D, E, NULL, NULL.


Can anyone suggest a way to do this? I will need to select from this and
hopefully add som simple conditions.

Would a VIEW be the way to go or will I have to use a stored procedure?


Regards,


Stephen.
x 5125




-------------------------------------------------------------------------------------------

Copyright material and/or confidential and/or privileged information may be contained in this e-mail and any attached
documents. The material and information is intended for the use of the intended addressee only.  If you are not the
intendedaddressee, or the person responsible for delivering it to the intended addressee, you may not copy, disclose,
distribute,disseminate or deliver it to anyone else or use it in any unauthorised manner or take or omit to take any
actionin reliance on it. To do so is prohibited and may be unlawful.   The views expressed in this e-mail may not be
officialpolicy but the personal views of the originator.  If you receive this e-mail in error, please advise the sender
immediatelyby using the reply facility in your e-mail software, or contact postmaster@bmwfin.com.  Please also delete
thise-mail and all documents attached immediately.  
 
Many thanks for your co-operation.

BMW Financial Services (GB) Limited is registered in England and Wales under company number 01288537.
Registered Offices : Europa House, Bartley Way, Hook, Hants, RG27 9UF
------------------------------------------------------------------------------------------


pgsql-sql by date:

Previous
From: Richard Huxton
Date:
Subject: Re: select from update from select?
Next
From: Christoph Haller
Date:
Subject: Re: " Adding missing FROM-clause entry for table .... " problem.