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-11 10:15:35
Message-ID: 1455185735548-5886990.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

The call_schedule table looks like this
id | integer | not null default
nextval('call_schedule_id_seq'::regclass)
account_id | integer | not null
user_id | integer | not null
call_type_id | integer | not null
call_frequency_id | integer | not null
start_time | timestamp without time zone | not null
duration | integer | not null
end_time | timestamp without time zone | not null
Indexes:
"call_schedule_pkey" PRIMARY KEY, btree (id)
Foreign-key constraints:
"call_schedule_account_id_fkey" FOREIGN KEY (account_id) REFERENCES
accounts(id)
"call_schedule_call_frequency_id_fkey" FOREIGN KEY (call_frequency_id)
REFERENCES call_frequency(id)
"call_schedule_call_type_id_fkey" FOREIGN KEY (call_type_id) REFERENCES
call_types(id)
"call_schedule_user_id_fkey" FOREIGN KEY (user_id) REFERENCES users(id)

This stores the start_time, which is the date and time a series of calls
begins. The duration defines how long this event(call) will go for, and the
end_time defines when the schedule will stop.
I need to generate a calendar eg: 1 year with intervals of 1 day, and
include fortnightly calls at the appropriate dates.
the call_frequency_id would be 5 for a fortnightly call.

I an post schema if you need.

--
View this message in context: http://postgresql.nabble.com/ERROR-missing-FROM-clause-entry-for-table-tp5886750p5886990.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 Martín Marqués 2016-02-11 10:26:00 Re: Transaction ID not logged if no explicit transaction used
Previous Message Achilleas Mantzios 2016-02-11 08:19:39 Re: pg_multixact issues