postgres 9.2 update query on a subset

المشرف العام

Administrator
طاقم الإدارة
I wish to make an update using CASE, on a subset of a table. This subset is based on a spatial query. It looks like :

update t1 set f1 = CASE WHEN... WHEN... END FROM (select * from t2 join t1 on st_intersects(t2.geom, t1.geom) WHERE *a_field_from_t2* = *a_value*) as foo ; This update always works with the whole set of t1 i.e. the spatial is not used. I cant fidn the reason why. Any help ? Thanks



أكثر...
 
أعلى