Re: Need help with sql select on null dates!

Поиск
Список
Период
Сортировка
От Henshall, Stuart - Design & Print
Тема Re: Need help with sql select on null dates!
Дата
Msg-id E382B5D8EDE1D6118DBE0008C759BCD6116ADC@WCPEXCHANGE
обсуждение исходный текст
Ответ на Need help with sql select on null dates!  (Jeff Sacksteder <jwsacksteder@ramprecision.com>)
Список 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' or:
>       'select * from employee_tables where
> isfinite(termination_date) <>
> 1'
>
> ...but no luck. What is the proper way to select undefined dates?
>
NULLs are unknown and therefore there equality can not be tested.
select * from employee_tables where termination_date is null;
ought to work however
hth,
- Stuart

В списке pgsql-general по дате отправления:

Предыдущее
От: Peter Choe
Дата:
Сообщение: process time of update
Следующее
От: Diogo Biazus
Дата:
Сообщение: Re: Need help with sql select on null dates!