Re: what's wrong with my date comparison?

Поиск
Список
Период
Сортировка
От Andrew Sullivan
Тема Re: what's wrong with my date comparison?
Дата
Msg-id 20071016180455.GQ3255@crankycanuck.ca
обсуждение исходный текст
Ответ на what's wrong with my date comparison?  ("Tena Sakai" <tsakai@gallo.ucsf.edu>)
Список pgsql-sql
On Tue, Oct 16, 2007 at 10:57:03AM -0700, Tena Sakai wrote:
>  select name, value, datecreated
>    from mytable
>   where datecreated > 2007-10-02;                       ^^^^^^^^^^

2007-10-02 is an arithmetic expression equivalent to 1995.

I think what you want is
WHERE datecreated > '2007-10-02';

Note the quotes.

A

-- 
Andrew Sullivan  | ajs@crankycanuck.ca
In the future this spectacle of the middle classes shocking the avant-
garde will probably become the textbook definition of Postmodernism.                --Brad Holland


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

Предыдущее
От: "Tena Sakai"
Дата:
Сообщение: Re: what's wrong with my date comparison?
Следующее
От: Michael Glaesemann
Дата:
Сообщение: Re: what's wrong with my date comparison?