Commit 89d8033e authored by Jean-Benoist Leger's avatar Jean-Benoist Leger

Équivalent mais plus lisible

parent 94b1507f
......@@ -13,16 +13,16 @@ WITH
mm AS
(
SELECT
DISTINCT ON (wc1.cc_id)
wc1.cc_id AS old_cc_id,
wc2.cc_id AS new_cc_id
min(wc2.cc_id) AS new_cc_id
FROM
rv_way_cc AS wc1
INNER JOIN
rv_way_way AS ww ON wc1.way_id=ww.id1
INNER JOIN
rv_way_cc AS wc2 ON ww.id2=wc2.way_id
ORDER BY wc1.cc_id,wc2.cc_id
GROUP BY
wc1.cc_id
)
UPDATE rv_way_cc
SET
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment