Re: Recurring bookings

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: Recurring bookings
Дата
Msg-id 56A0AFA5.7000800@hogranch.com
обсуждение исходный текст
Ответ на Recurring bookings  (Kevin Waterson <kevin.waterson@gmail.com>)
Ответы Re: Recurring bookings  (cpolish@surewest.net)
Список pgsql-general
On 1/21/2016 2:05 AM, Kevin Waterson wrote:
> So far this is what I have.. (see below).
> How can I have recurring bookings for a call?
> Eg: if the call_frequency is weekly, how can I see a list of dates
> which this account will be called upon?
>

your call frequency table probably should have a field interval_length
of type INTERVAL with values like INTERVAL '1 week'

then you could do something like select start_date +
interval_length*int_num from call_frequency join generate_series(1,n) as
int_num where call_frequency.id = ?;


--
john r pierce, recycling bits in santa cruz



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

Предыдущее
От: Kevin Waterson
Дата:
Сообщение: Recurring bookings
Следующее
От: Geoff Winkless
Дата:
Сообщение: Re: CoC [Final]