I'm trying to update the field of a point table with a value from a linestring one :
update object_elevation set contour_elevation = c.contour from contours c where st_intersects(st_ClosestPoint(c.geom,object_elevation.geom),c.geom)
So what I want to do going from this query is update the contour_elevation field from the table object_elevation with the value stored in the field contour of the layer contours.
So what the query is supposed to do is return the closespoint to the linestring and then get the value of the elevation from the line layer and update with it the point layer.
However the result returned is the same. All the features have the same value of the field after update and I know very well that shouldn't be like this.
What am I missing in this query?