Re: Date Math

Поиск
Список
Период
Сортировка
От A. Kretschmer
Тема Re: Date Math
Дата
Msg-id 20070507170213.GA8281@a-kretschmer.de
обсуждение исходный текст
Ответ на Date Math  (Rich Shepard <rshepard@appl-ecosys.com>)
Ответы Re: Date Math  (Rich Shepard <rshepard@appl-ecosys.com>)
Список pgsql-general
am  Mon, dem 07.05.2007, um  9:43:50 -0700 mailte Rich Shepard folgendes:
>   From table (Permits) I want to identify those which expire within a
> specified time from today. For example:
>
>     SELECT permit_nbr, title, date_issued, term,
>         process_time from Permits
>     WHERE (date_issued + term YEARS)
>         < (CURRENT_DATE + process_time MONTHS);
>
>   Should I use TODAY rather than CURRENT_DATE? Do I need to cast intervals
> explicitly from seconds to days, months, or years?

I'm not sure if I understand you correctly, if not, sorry.
I think, you should cast your intervals, an example:

select current_date + '10 months'::interval;

You syntax above are wrong.


Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

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

Предыдущее
От: Rich Shepard
Дата:
Сообщение: Date Math
Следующее
От: "Andrus"
Дата:
Сообщение: Re: tuple concurrently updated