Re: Recurring bookings

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Recurring bookings
Date: 2016-01-21 10:15:01
Message-ID: 56A0AFA5.7000800@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Geoff Winkless 2016-01-21 10:28:59 Re: CoC [Final]
Previous Message Kevin Waterson 2016-01-21 10:05:54 Recurring bookings