Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Include Null values in SELECT output
Randy Harris wrote:
> 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.
Setting? No.
Use UNION ALL or rewrite your WHERE clause.
-- Daniel Morgan http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Sat Nov 15 2003 - 20:55:54 CST