[Portugal] Intersectar tabelas Postgis

Pedro Venâncio pedrongvenancio at yahoo.com
Thu Jul 14 11:41:23 EDT 2011


Olá Rui,

>>UPDATE plantas_emitidas
>>SET (dicofre_plantas, freguesia) =
>>(SELECT dicofre, freguesia
>>             FROM caop_2010
>>             WHERE ST_CONTAINS(caop.2010.the_geom, plantas_emitidas.the_geom)); 

Por acaso esta era uma das tentativas que tinha feito, mas devolve-me este erro

ERROR:  syntax error at or near "SELECT"
LINE 3: (SELECT dicofre, freguesia
         ^

********** Erro **********

ERROR: syntax error at or near "SELECT"
Estado de SQL:42601
Carácter:61



Olhei uma série de vezes para a trigger e não me apercebi do 2011! :) 

No entanto, com essa falha corrigida, devolve-me este outro erro:

ERROR:  missing FROM-clause entry for table "plantas_emitidas"
LINE 1: ...M caop_2010 WHERE st_contains(caop_2010.the_geom, plantas_em...
                                                             ^
QUERY:  SELECT dicofre FROM caop_2010 WHERE st_contains(caop_2010.the_geom, plantas_emitidas.the_geom)
CONTEXT:  PL/pgSQL function "preenche_dicofre_plantas" line 2 at SQL statement



Obrigado!

Pedro



More information about the Portugal mailing list