Re: Using SELECT WHERE

Поиск
Список
Период
Сортировка
От Ron St-Pierre
Тема Re: Using SELECT WHERE
Дата
Msg-id 40859CF2.7090805@syscor.com
обсуждение исходный текст
Ответ на Using SELECT WHERE  (Michal Lijowski <michal@cvu.wustl.edu>)
Список pgsql-novice
Michal Lijowski wrote:

>I made a database and I would like to select entries
>which have data not equal to the specified date.
>I have postgresql-7.3.4-11  on Red Hat Fedora Core 1.
>
>Here is the command
>
>RabStudies=> SELECT RabNo, ImplantDate, Comments    FROM RabStudiesInfo
>where  implantdate <> 0001-01-01;
>
>
Try quoting the date:

SELECT RabNo, ImplantDate, Comments    FROM RabStudiesInfo where  implantdate <> '0001-01-01';


>and I get
>
> rabno | implantdate |                                     comments
>
>   307 | 2004-02-23  |  No mimetic No target
>   309 | 2004-02-23  |  No mimetic No target; Frame 12 study terminated
>   314 | 2004-02-27  |  No mimetic No target
>   311 | 2004-02-27  |  No mimetic No target
>   310 | 2004-02-26  |  No mimetic No target No decoy
>   315 | 0001-01-01  |  No Tumor
>   320 | 0001-01-01  |  No Tumor
>   316 | 0001-01-01  |  No Tumor
>   313 | 0001-01-01  |  No Tumor
>
>Why entries with implandate are listed?
>It is the same when I use != instead of <>.
>
>Thanks,
>
>Michal
>
>
Ron


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: question on forced-killing the postmaster
Следующее
От: Ron St-Pierre
Дата:
Сообщение: Re: Start with -i