Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Include Null values in SELECT output

Re: Include Null values in SELECT output

From: Onismus Radebe <onismusrATabsaDOTcoDOTza_at_za>
Date: Mon, 17 Nov 2003 08:38:11 +0200
Message-ID: <3fb86ccc$0$64723@hades.is.co.za>

"Randy Harris" <randy_at_SpamFree.com> wrote in message news:pPAtb.10448$P%1.9207659_at_newssvr28.news.prodigy.com...
> Is there any sort of simple setting to cause Oracle 8.1.7 to include Null
> values in a <> Where clause?
>
> SELECT .... FROM ....
> WHERE Status <> 'Completed';
>
> In this particular case, Status is set to permit Null values and I would
> like the query to return ALL records that don't have "Completed" for the
> Status, including any that are Null.
>
> Note: I've updated the application to put a default Status in the field,
but
> there are still many legacy records with no Status, and a number of other
> Fields with the same situation.
>
>

SELECT .... FROM ....
WHERE nvl(Status,"Blank") <> 'Completed';

This will "replace" or substitute the null value with a string "Blank".

Received on Mon Nov 17 2003 - 00:38:11 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US