Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 403B39FB1BC for ; Fri, 3 Nov 2006 20:28:16 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 74158-08 for ; Sat, 4 Nov 2006 00:28:13 +0000 (UTC) X-Greylist: delayed 02:06:41.272696 by SQLgrey- Received: from smtp-out.google.com (smtp-out.google.com [216.239.33.17]) by postgresql.org (Postfix) with ESMTP id 3F18F9F9F77 for ; Fri, 3 Nov 2006 20:28:13 -0400 (AST) Received: from spaceape12.eur.corp.google.com (spaceape12.eur.corp.google.com [172.28.16.146]) by smtp-out.google.com with ESMTP id kA40S9Ll009164 for ; Sat, 4 Nov 2006 00:28:09 GMT DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=received:message-id:date:from:to:subject:cc:in-reply-to: mime-version:content-type:references; b=nIoogCheO7M5u2NC0Qgid8fjPy6hRFR6ayqFBK11liiEWFD6CYZE0JtNdsk/gW3Ob ZwvoOi6cO4PA8O+QXfGWg== Received: from nf-out-0910.google.com (nfcm19.prod.google.com [10.48.114.19]) by spaceape12.eur.corp.google.com with ESMTP id kA40RoiJ022186 for ; Sat, 4 Nov 2006 00:28:07 GMT Received: by nf-out-0910.google.com with SMTP id m19so1492441nfc for ; Fri, 03 Nov 2006 16:28:06 -0800 (PST) Received: by 10.78.57.11 with SMTP id f11mr337173hua.1162600086578; Fri, 03 Nov 2006 16:28:06 -0800 (PST) Received: by 10.78.140.8 with HTTP; Fri, 3 Nov 2006 16:28:06 -0800 (PST) Message-ID: <3ddac38d0611031628y16fc3ab8ma425282efa509ba7@mail.gmail.com> Date: Fri, 3 Nov 2006 16:28:06 -0800 From: "Dylan Lorimer" To: "Richard Broersma Jr" Subject: Re: Duplicate Fields + Views Questions Cc: pgsql-sql@postgresql.org In-Reply-To: <20061104001858.29178.qmail@web31808.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_24780_16091394.1162600086351" References: <3ddac38d0611031607w5564c44dk8e0c0a6cd5fdf0c@mail.gmail.com> <20061104001858.29178.qmail@web31808.mail.mud.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/49 X-Sequence-Number: 26701 ------=_Part_24780_16091394.1162600086351 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks, Got it working with a UNION. Cheers, dylan On 11/3/06, Richard Broersma Jr 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 ------=_Part_24780_16091394.1162600086351 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 ------=_Part_24780_16091394.1162600086351--