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_at_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 Fri Feb 13 2004 - 01:29:18 CET

Original text of this message