Обсуждение: Duplicate Fields + Views Questions

Поиск
Список
Период
Сортировка

Duplicate Fields + Views Questions

От
"Dylan Lorimer"
Дата:
Hi,<br /><br />I've got 2 views - each with identical column names. I want to create an aggregate view of both tables
asa new view. But when I try to do this I understandably get errors on duplicate fields.<br /><br />As an example: <br
/><br/>CREATE VIEW gnis_view AS SELECT * FROM gnis_international_view, gnis_usa_view;<br />ERROR:  column "the_geom"
duplicated<br/>ERROR:  column "the_geom" duplicated<br /><br />Any ideas on how I can achieve what I am seeking? <br
/>Cheers,<br/>dylan<br /> 

Re: Duplicate Fields + Views Questions

От
Richard Broersma Jr
Дата:
> 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.


Re: Duplicate Fields + Views Questions

От
"Dylan Lorimer"
Дата:
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