Re: Need help with sql select on null dates!

From: Diogo Biazus <diogo(at)ikono(dot)com(dot)br>
To: Jeff Sacksteder <jwsacksteder(at)ramprecision(dot)com>
Cc: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Need help with sql select on null dates!
Date: 2002-11-26 14:01:45
Message-ID: 3DE37EC9.8060600@ikono.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jeff Sacksteder wrote:

>I'm having trouble doing a select on empty date fields.
>
>Suppose my table is composed of employee_number(char), hire_date(date), and
>termination_date(date).
>I would expect to be able to say:
>
> 'select * from employee_tables where termination_date = null'
>
>
Isntead of '= null' you should use the 'IS NULL' operator.
For example:

'select * from employee_tables where termination_date is null'

--
Diogo de Oliveira Biazus
diogo(at)ikono(dot)com(dot)br
Ikono Sistemas e Automação
http://www.ikono.com.br

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2002-11-26 14:08:24 Re: Need help with sql select on null dates!
Previous Message Peter Alberer 2002-11-26 13:55:16 pgsql-function called twice in the same second -> Double Insert -> Error