Mercurial > dive4elements > river
view flys-aft/src/main/resources/sql/flys-common.properties @ 4092:b3fc044f75ba
Added code to store W/Q values into FLYS database.
flys-aft/trunk@3602 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 05 Jan 2012 17:06:29 +0000 |
parents | a91c7e982c32 |
children | 82f5266f881b |
line wrap: on
line source
select.river = SELECT id, name FROM rivers select.gauges = SELECT id, name, official_number FROM gauges WHERE river_id = :river_id next.gauge.id = SELECT NEXTVAL('GAUGES_ID_SEQ') AS gauge_id insert.gauge = INSERT INTO gauges (id, name, river_id, station, aeo, official_number, datum) \ VALUES(:id, :name, :river_id, :station, :aeo, :official_number, :datum) select.timeintervals = SELECT id, start_time, stop_time FROM time_intervals next.timeinterval.id = SELECT NEXTVAL('TIME_INTERVALS_ID_SEQ') AS time_interval_id insert.timeinterval = INSERT INTO time_intervals (id, start_time, stop_time) VALUES (:id, :start_time, :stop_time) next.discharge.id = SELECT NEXTVAL('DISCHARGE_TABLES_ID_SEQ') AS discharge_table_id insert.dischargetable = INSERT INTO discharge_tables (id, gauge_id, description, kind, time_interval_id) \ VALUES (:id, :gauge_id, :description, 0, :time_interval_id) select.discharge.table.values = SELECT id, w, q FROM discharge_table_values WHERE table_id = :table_id next.discharge.table.values.id = SELECT NEXTVAL('DISCHARGE_TABLE_VALUES_ID_SEQ') AS discharge_table_values_id insert.discharge.table.value = INSERT INTO discharge_tables (id, table_id, w, q) VALUES (:id, :table_id, :w, :q)