diff flys-aft/src/main/resources/sql/flys-common.properties @ 5258:da1e897c7224

Set the BFG_ID for current discharge tables in FLYS.
author Sascha L. Teichmann <teichmann@intevation.de>
date Tue, 12 Mar 2013 19:15:18 +0100
parents 46e984a3d576
children 11fba4dabe05
line wrap: on
line diff
--- a/flys-aft/src/main/resources/sql/flys-common.properties	Mon Mar 11 12:55:09 2013 +0100
+++ b/flys-aft/src/main/resources/sql/flys-common.properties	Tue Mar 12 19:15:18 2013 +0100
@@ -47,3 +47,11 @@
     FROM discharge_tables dt \
     LEFT OUTER JOIN time_intervals ti ON dt.time_interval_id = ti.id \
     WHERE gauge_id = :gauge_id
+select.gauge.master.discharge.table = \
+    SELECT \
+        dt.id AS id, \
+        dt.bfg_id AS bfg_id \
+    FROM discharge_tables dt JOIN gauges g ON dt.gauge_id = g.id \
+    WHERE g.id = :gauge_id AND g.kind = 0
+update.bfg.id.discharge.table = \
+    UPDATE discharge_tables SET bfg_id = :bfg_id WHERE id = :id

http://dive4elements.wald.intevation.org