turn select statement to insert

This commit is contained in:
Ed Chalstrey 2022-04-11 10:11:13 +01:00
parent d930ae3a75
commit 8433a95f2d

View File

@ -18,9 +18,10 @@
# geometry_id serial PRIMARY KEY, # geometry_id serial PRIMARY KEY,
# source_id varchar(30) # source_id varchar(30)
# );" # );"
psql -c "SELECT geometry_id, source_id psql -c "INSERT INTO new_geometries ( geometry_id, source_id )
FROM geometries SELECT geometry_id, source_id
WHERE source_id NOT IN ( SELECT ref_toid FROM buildings);" FROM geometries
WHERE source_id NOT IN ( SELECT ref_toid FROM buildings);"
# for building in buildings # for building in buildings