a guest Jul 22nd, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. UPDATE Table_1
  2. SET field_1 = list.distance
  3. FROM(
  4.     SELECT T1.gid AS name, MIN(T1.geom <-> T2.geom) AS distance
  5.     FROM Table_1 AS T1
  6.     CROSS JOIN Table_2 AS T2
  7.     GROUP BY T1.gid
  8.     ORDER BY T1.gid
  9.      ) AS list
  10. WHERE Table_1.gid =;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand