Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Im trying to run this query :

create TABLE data.agri_grc as select
id, code_00,
ST_Intersection(data.agri.geom,data.grc_bor.geom) as geom from

But im getting this error:

ERROR:  missing FROM-clause entry for table "grc_bor"
LINE 3: ST_Intersection(data.agri.geom,data.grc_bor.geom) as geom fr...

Whats I am missing?

In postgis2 db

share|improve this question
up vote 3 down vote accepted

@Mapperz Link pointed me to the right direction.

The correct SQL query seems to be :

create table data.agri_grc as select, 
 ST_Intersection(a.geom,b.geom_3035) as geom from
  data.agri as a, 
  data.grc_bor as b;

you need to put the arguments as table aliases

share|improve this answer
The aliases don't matter. The query in the question only selects from agri table but grc_bor table is missing in the from part. – underdark Oct 25 '12 at 5:31

Try to put the entire SELECT clause in (...)

share|improve this answer
It's more elaborate than that. The link @mapperz gave me an answer. I'll update in a bit :) – nickves Sep 24 '12 at 21:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.