This commit is contained in:
Colas Geier 2024-08-20 19:19:51 +02:00
parent 079c675dc6
commit 631e1b479f

View File

@ -722,7 +722,7 @@ def update_typprop(con=con_fon):
sql = '''set work_mem='512MB'; sql = '''set work_mem='512MB';
UPDATE UPDATE
cadastre.parcelles cadastre.parcelles
SET typprop_id = coalesce(gtoper::text,'_'||ccogrm::text) SET typprop_id = nullif(concat_ws('_',gtoper::text,ccogrm::text),'')
FROM cadastre.proprios FROM cadastre.proprios
JOIN cadastre.r_prop_cptprop USING (dnuper) JOIN cadastre.r_prop_cptprop USING (dnuper)
JOIN cadastre.cptprop USING (dnupro) JOIN cadastre.cptprop USING (dnupro)
@ -741,10 +741,10 @@ if __name__ == "__main__":
from pycen import update_to_sql from pycen import update_to_sql
# par = '3805050000E0523' # par = '3805050000E0523'
par = None par = None
sch = '38_202307' sch = '38_202407'
drop_tables(con_fon) drop_tables(con_fon)
lst_sch = ['07_202307','26_202307','42_202307','38_202307'] lst_sch = ['07_202407','26_202407','42_202407','38_202407']
for sch in lst_sch: for sch in lst_sch:
print(' INIT ',sch) print(' INIT ',sch)
insert_voie(sch) insert_voie(sch)