| От | Bruno Wolff III |
|---|---|
| Тема | Re: Need help with sql select on null dates! |
| Дата | |
| Msg-id | 20021126140824.GA31105@wolff.to обсуждение исходный текст |
| Ответ на | Need help with sql select on null dates! (Jeff Sacksteder <jwsacksteder@ramprecision.com>) |
| Список | pgsql-general |
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".
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера