Re: ERROR: column "gid" specified more than once - Mailing list pgsql-sql

From Jason Aleski
Subject Re: ERROR: column "gid" specified more than once
Date
Msg-id 55521B89.1090900@gmail.com
Whole thread Raw
In response to ERROR: column "gid" specified more than once  (BahramPSQL <bahramjomezade.gis92@gmail.com>)
Responses Re: ERROR: column "gid" specified more than once  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-sql
You probably need to specify your wildcard on both tables.

CREATE TABLE "BorujerdDistCent" as
SELECT  "Borujerd".*, "Lorestan".*, t_distance(st_centroid("Lorestan".geometry),"Borujerd".geometry)/1000
as DistFromCntroid
FROM "Borujerd", "Lorestan"
Where "Lorestan"."Shahrestan" = 'بروجرد'
ORDER BY  "Borujerd".abady_name ASC






Jason Aleski / IT Specialist

On 5/12/2015 3:31 AM, BahramPSQL wrote:
> I want to run a spatial query from two table!
>
> CREATE TABLE "BorujerdDistCent" as
> SELECT
>    *, st_distance(st_centroid("Lorestan".geometry),"Borujerd".geometry)/1000
> as DistFromCntroid
> FROM "Borujerd", "Lorestan"
> Where "Lorestan"."Shahrestan" = 'بروجرد'
> ORDER BY
>    "Borujerd".abady_name ASC
>
> But i will see this error!
> ERROR:  column "gid" specified more than once
> ********** Error **********
>
> ERROR: column "gid" specified more than once
> SQL state: 42701
>
>
>
> --
> View this message in context: http://postgresql.nabble.com/ERROR-column-gid-specified-more-than-once-tp5848845.html
> Sent from the PostgreSQL - sql mailing list archive at Nabble.com.
>
>




pgsql-sql by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: ERROR: column "gid" specified more than once
Next
From: "David G. Johnston"
Date:
Subject: Re: ERROR: column "gid" specified more than once