Re: ERROR: missing FROM-clause entry for table

From: bigkev <kevin(dot)waterson(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: ERROR: missing FROM-clause entry for table
Date: 2016-02-10 09:33:43
Message-ID: 1455096823050-5886777.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Yes, c.start_time is a timestamp.
My goal is to list events (calls) which are scheduled on fortnightly basis.

The query works with hard coded values, but I need to generate results for
days beginning at the start_time and ending with the end_time.: eg:

2016-02-06
2016-02-07
2016-02-08 | Some account name | other info
2016-02-09
2016-02-10
....
2016-02-22 | Some account name | other info
2016-02-23
2016-02-24
etc etc

All dates within the first generate_series are listed, 1 row for each day.
The second generate_series is to show events(calls) which begin on
c.start_time and end at c.start_time.
Records would be displayed, at each 14 days from the start_time.
In the above example, this would be 2016-02-08 and end_time would be a date
in the future.

--
View this message in context: http://postgresql.nabble.com/ERROR-missing-FROM-clause-entry-for-table-tp5886750p5886777.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Karsten Hilbert 2016-02-10 10:40:12 Re: PostgreSQL vs Firebird SQL
Previous Message Achilleas Mantzios 2016-02-10 08:34:53 Re: PostgreSQL vs Firebird SQL