This commit is contained in:
Carla
2014-08-26 11:00:13 +02:00
parent 4e56d7cf03
commit ec78d147bf
2 changed files with 61 additions and 1 deletions

View File

@@ -0,0 +1,26 @@
---- Postal Code Points table ---
-- Clear table
DELETE FROM zipcode_points;
-- Insert points
DELETE FROM zipcode_points;
INSERT INTO zip_code_points (the_geom, zipcode, iso3)
SELECT the_geom, zipcode,
(
SELECT country_decoder.iso3 FROM country_decoder
WHERE tmp_zipcode_points.iso2 = country_decoder.iso2
)
FROM tmp_zipcode_points
);
-- Drops temporary table
DROP TABLE tmp_zipcode_points;