| 30 | |
| 31 | -- Attribution des id_drains |
| 32 | alter table pate.station_hydro add column id_drain integer; |
| 33 | UPDATE pate.station_hydro SET id_drain=sub.id_drain from (select r.id_drain, s.code_station from pate.station_hydro s inner join rht.rhtvs2 r |
| 34 | on st_dwithin(s.the_geom,r.the_geom,300)) as sub where station_hydro.code_station=sub.code_station; |
| 35 | |
| 36 | UPDATE pate.station_hydro SET id_drain='308381' where code_station='I5221010'; |
| 37 | UPDATE pate.station_hydro SET id_drain='105760' where code_station='P8462510'; |
| 38 | UPDATE pate.station_hydro SET id_drain='20375' where code_station='Y2142010'; |
| 39 | UPDATE pate.station_hydro SET id_drain='121008' where code_station='Q7002910'; |
| 40 | UPDATE pate.station_hydro SET id_drain='119550' where code_station='Q7412910'; |
| 41 | UPDATE pate.station_hydro SET id_drain='209735' where code_station='J8502310'; |
| 42 | UPDATE pate.station_hydro SET id_drain='122242' where code_station='Q6332510'; |