On Tue, Nov 26, 2002 at 08:47:02 -0500,
Jeff Sacksteder <jwsacksteder@ramprecision.com> wrote:
> I'm having trouble doing a select on empty date fields.
Can you be more precise in what you mean by "empty"? Do you mean NULL?
> 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'
> or:
> 'select * from employee_tables where isfinite(termination_date) <>
> 1'
>
> ...but no luck. What is the proper way to select undefined dates?
Neither of the about will return rows with termination_date null in recent
versions of postgres. If the value you are trying to match is null, then
using "is null" instead of "= null".