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,7 +18,8 @@
# 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 )
SELECT geometry_id, source_id
FROM geometries FROM geometries
WHERE source_id NOT IN ( SELECT ref_toid FROM buildings);" WHERE source_id NOT IN ( SELECT ref_toid FROM buildings);"