Re: Recurring bookings - Mailing list pgsql-general

From John R Pierce
Subject Re: Recurring bookings
Date
Msg-id 56A0AFA5.7000800@hogranch.com
Whole thread Raw
In response to Recurring bookings  (Kevin Waterson <kevin.waterson@gmail.com>)
Responses Re: Recurring bookings  (cpolish@surewest.net)
List 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 by date:

Previous
From: Kevin Waterson
Date:
Subject: Recurring bookings
Next
From: Geoff Winkless
Date:
Subject: Re: CoC [Final]