I am novice in QGIS (QGIS 2.8.3, postgresql 9.4.5.)I need to update some filelds in the line layer. First I create the table and pop-up with some data. Then I must update some fields via spatial query.
If i run this query:
(SELECT owner_idFROM public.water_line, public.water_sistemWHERE ST_contains( water_sistem.geom, water_line.geom));i only get 2 records (for line 2 and 3).Then if I try to update field in the layer "water_line" with this query:
UPDATE water_line SET owner_id_line = (SELECT owner_idFROM public.water_line, public.water_sistemWHERE ST_contains( water_sistem.geom, water_line.geom));I get an error:ERROR: more than one row returned by a subquery used as an expression********** Error **********
ERROR: more than one row returned by a subquery used as an expressionSQL state: 21000
Is use of this spatial type ok in my case? What I doing wrong? Tnx in advance.
أكثر...
If i run this query:
(SELECT owner_idFROM public.water_line, public.water_sistemWHERE ST_contains( water_sistem.geom, water_line.geom));i only get 2 records (for line 2 and 3).Then if I try to update field in the layer "water_line" with this query:
UPDATE water_line SET owner_id_line = (SELECT owner_idFROM public.water_line, public.water_sistemWHERE ST_contains( water_sistem.geom, water_line.geom));I get an error:ERROR: more than one row returned by a subquery used as an expression********** Error **********
ERROR: more than one row returned by a subquery used as an expressionSQL state: 21000
Is use of this spatial type ok in my case? What I doing wrong? Tnx in advance.

أكثر...