From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: create view
Date: Tue, 17 Sep 2019 14:12:50 -0500
Message-ID: <d9616945-c460-90b2-99c8-f7c239f70871@gmail.com> (raw)
In-Reply-To: <1896838771.5876030.1568744001412@mail.yahoo.com>
References: <1896838771.5876030.1568744001412.ref@mail.yahoo.com>
<1896838771.5876030.1568744001412@mail.yahoo.com>
On 9/17/19 1:13 PM, Pepe TD Vo wrote:
> Hello experts,
>
> I need to create view from schema's tables and when I run I get an error:
>
> CREATE or REPLACE view "ECISDRDM"."BENE_VW" (
> receipt_number,
> service_center,
[snip]
> ERROR: column ap.application_id does not exist
> LINE 50: INNER JOIN "ECISDRDM"."BNFT_CURR_FACT"bcf ON (ap.applicatio...
> ^
> SQL state: 42703
> Character: 864
[snip]
> I do a simple select query of application_cdim table, the result is fine:
>
> Select *
> FROM "ECISDRDM"."APPLICATION_CDIM" ap
When you have a weird error on a long or statement, simplify, simplify,
simplify.
Make a simple test view that's just on "ECISDRDM"."APPLICATION_CDIM". Then
make another test view that's just a join between those two tables.
Simplify everything as much as possible be only selecting a few columns, etc.
That might show where your error is.
--
Angular momentum makes the world go 'round.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: ronljohnsonjr@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: create view
In-Reply-To: <d9616945-c460-90b2-99c8-f7c239f70871@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox