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

Home -> Community -> Usenet -> comp.databases.oracle -> Re: How to test for a null value in a date column

Re: How to test for a null value in a date column

From: Hans Forbrich <hforbric_at_yahoo.net>
Date: Fri, 13 Feb 2004 00:29:18 GMT
Message-ID: <402C1A82.F9112BDE@yahoo.net>

Jagdip Singh Ajimal wrote:
>
> I am creating the following view
>
> CREATE OR REPLACE VIEW AllMedics AS
> SELECT * FROM Medic m, Employee e
> WHERE e.EmployeeID = m.MedicID AND
> e.DateFinished = NULL;
>
> But all I get is "no rows selected". How do I test a date column to
> see if it is null?
>
> NB The DateDinished above means the date that the employee was
> fired/resigned.
>
> Any help would be greatly appriciated.
>
> Jagdip Singh Ajimal

Consider this: what is the definition of 'NULL' and how can anything 'equate' to that 'value'?

You want to use the 'IS NULL', not the '= NULL' construct.

(This is basic SQL - please consider reviewing your/an 'introduction to SQL' documentation or book. Things like this are not intuitive to the uninitiated and will lead to frustration.) /Hans Received on Thu Feb 12 2004 - 18:29:18 CST

Original text of this message

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