pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedDuplicate Fields + Views Questions
3+ messages / 2 participants
[nested] [flat]
* Duplicate Fields + Views Questions
@ 2006-11-04 00:07 Dylan Lorimer <edylan@google.com>
2006-11-04 00:18 ` Re: Duplicate Fields + Views Questions Richard Broersma Jr <rabroersma@yahoo.com>
0 siblings, 1 reply; 3+ messages in thread
From: Dylan Lorimer @ 2006-11-04 00:07 UTC (permalink / raw)
To: pgsql-sql
Hi,
I've got 2 views - each with identical column names. I want to create an
aggregate view of both tables as a new view. But when I try to do this I
understandably get errors on duplicate fields.
As an example:
CREATE VIEW gnis_view AS SELECT * FROM gnis_international_view,
gnis_usa_view;
ERROR: column "the_geom" duplicated
ERROR: column "the_geom" duplicated
Any ideas on how I can achieve what I am seeking?
Cheers,
dylan
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Duplicate Fields + Views Questions
2006-11-04 00:07 Duplicate Fields + Views Questions Dylan Lorimer <edylan@google.com>
@ 2006-11-04 00:18 ` Richard Broersma Jr <rabroersma@yahoo.com>
2006-11-04 00:28 ` Re: Duplicate Fields + Views Questions Dylan Lorimer <edylan@google.com>
0 siblings, 1 reply; 3+ messages in thread
From: Richard Broersma Jr @ 2006-11-04 00:18 UTC (permalink / raw)
To: Dylan Lorimer <edylan@google.com>; pgsql-sql
> I've got 2 views - each with identical column names. I want to create an
> aggregate view of both tables as a new view. But when I try to do this I
> understandably get errors on duplicate fields.
>
> As an example:
>
> CREATE VIEW gnis_view AS SELECT * FROM gnis_international_view,
> gnis_usa_view;
> ERROR: column "the_geom" duplicated
> ERROR: column "the_geom" duplicated
>
> Any ideas on how I can achieve what I am seeking
Yes but you will have to specify each column name from each table and create aliases for the
duplicated columns.
Regards,
Richard Broersma Jr.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Duplicate Fields + Views Questions
2006-11-04 00:07 Duplicate Fields + Views Questions Dylan Lorimer <edylan@google.com>
2006-11-04 00:18 ` Re: Duplicate Fields + Views Questions Richard Broersma Jr <rabroersma@yahoo.com>
@ 2006-11-04 00:28 ` Dylan Lorimer <edylan@google.com>
0 siblings, 0 replies; 3+ messages in thread
From: Dylan Lorimer @ 2006-11-04 00:28 UTC (permalink / raw)
To: Richard Broersma Jr <rabroersma@yahoo.com>; +Cc: pgsql-sql
Thanks,
Got it working with a UNION.
Cheers,
dylan
On 11/3/06, Richard Broersma Jr <rabroersma@yahoo.com> wrote:
>
> > I've got 2 views - each with identical column names. I want to create an
> > aggregate view of both tables as a new view. But when I try to do this I
> > understandably get errors on duplicate fields.
> >
> > As an example:
> >
> > CREATE VIEW gnis_view AS SELECT * FROM gnis_international_view,
> > gnis_usa_view;
> > ERROR: column "the_geom" duplicated
> > ERROR: column "the_geom" duplicated
> >
> > Any ideas on how I can achieve what I am seeking
>
> Yes but you will have to specify each column name from each table and
> create aliases for the
> duplicated columns.
>
> Regards,
>
> Richard Broersma Jr.
>
--
E. Dylan Lorimer | Google Earth Enterprise
650.253.2459 (O) | 650.862.6810 (M) | 650.644.0182 (F)
--------------------------------------------------------------------------------
Earth Enterprise Support: fusion@google.com | 866.4GO.OGLE ext. 4
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2006-11-04 00:28 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-11-04 00:07 Duplicate Fields + Views Questions Dylan Lorimer <edylan@google.com>
2006-11-04 00:18 ` Richard Broersma Jr <rabroersma@yahoo.com>
2006-11-04 00:28 ` Dylan Lorimer <edylan@google.com>
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