Re: Search problem

Поиск
Список
Период
Сортировка
От James R. R. Service
Тема Re: Search problem
Дата
Msg-id 38F51EC3.3AE9EE5@yahoo.com
обсуждение исходный текст
Ответ на Search problem  ("Oscar" <oscar@sjs.com>)
Список pgsql-general
Oscar wrote:

> I am using apache/php and postgres and I tried a search with dates, but it
> doesn't accept it...
>
> select * from table where date_field < 10-10-2000;
>
> It yells that I cannot use < signs with ints and dates...
>
> Any suggestions ??

Use quotes for *anything* other than numbers.  A date is not a number so
try:

select * from table where date_field < '10-10-2000' ;

However, depending on how dates are formatted it might be better written
as

select * from table where date_field < '2000-10-10' ;

--Jim

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

Предыдущее
От: "James R. R. Service"
Дата:
Сообщение: Re: Importing a comma-delimited text file
Следующее
От: "Jigishu P Bhatt"
Дата:
Сообщение: pgtcl function Error : Tcl_GetChannel