Version 4 (modified by cedric, 13 years ago) (diff) |
---|
back to first page..
Integrate roe_pate_france.csv (from Virginie 23 mars 2012) into access data and export ODBC link
alter table "PATE_France" rename to pate_france; alter table pate_france set schema rht; alter table rht.pate_france rename column "nomCart" to nomCart; alter table rht.pate_france rename column "nomTopo" to nomTopo; alter table rht.pate_france rename column "commNom" to commNom; alter table rht.pate_france rename column "Id_ROE" to Id_ROE; alter table rht.pate_france rename column "Nom" to Nom; alter table rht.pate_france rename column "XL93" to XL93; alter table rht.pate_france rename column "YL93" to YL93; alter table rht.pate_france rename column "typeNom" to typeNom; alter table rht.pate_france rename column "stypeNom" to stypeNom; alter table rht.pate_france rename column "staNom" to staNom; alter table rht.pate_france rename column "deptNom" to deptNom; alter table rht.pate_france rename column "note_fr_Anguille" to note_fr_Anguille; alter table rht.pate_france add column a_conserver boolean default TRUE; SELECT AddGeometryColumn ( 'rht','pate_france','the_geom',3035,'POINT',2); update rht.pate_france set the_geom=obstacle.the_geom from roe_v3.obstacle where obstacle.id_roe=pate_france.id_roe; select count(*) from rht.pate_france where the_geom is null; ---0
--correction de la requete précédente pour utiliser la version roev2 en attendant la version v3 projettée update rht.pate_france set a_conserver=FALSE where stanom like '%Obso%'--61 update rht.pate_france set the_geom=NULL; update rht.pate_france set the_geom=rhtvs2_roev2.the_geom from rht.rhtvs2_roev2 where rhtvs2_roev2.id_roe=pate_france.id_roe; --3310 select * from rht.pate_france where the_geom is null; --198 select count(*) from rht.pate_france; --3508 -- je rajoute l'id_drain dans la table rht.pate_france alter table rht.pate_france add column id_drain integer; update rht.pate_france set id_drain=sub.id_drain from ( select rhtvs2_roev2.id_drain, rhtvs2_roev2.id_roe from rht.pate_france join rht.rhtvs2_roev2 on rhtvs2_roev2.id_roe=pate_france.id_roe) sub where sub.id_roe=pate_france.id_roe; --3310