Re: two dates

Поиск
Список
Период
Сортировка
Искать
От
Oliver Elphick
Тема
Re: two dates
Дата
Msg-id
1046694764.2173.132.camel@linda.lfix.co.uk
Ответ на
Re: two dates (Richard Huxton)
Список
Дерево обсуждения
Re: two dates "D.Sanchez" <dsanchezREMOVE@bigpond.com>
On Mon, 2003-03-03 at 12:09, Richard Huxton wrote:
> What is wrong with SELECT id FROM foo WHERE created_date>='2003-01-01' AND 
> created_date<='2003-01-07' or similar? I don't see why you need multiple 
> queries, perhaps I have misunderstood

The BETWEEN operator is provided for this precise requirement:
SELECT id FROM foo WHERE created_date BETWEEN '2003-01-01' AND '2003-01-07';

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C                ========================================    "A new commandment I give to you, that you love one     another, even as I have loved you."                                       John 13:34


В списке pgsql-sql по дате отправления
От: Richard Huxton
Дата:
Сообщение: Re: two dates
От: Tomasz Myrta
Дата:
Сообщение: Re: pl/pgsql errors
FAQ