diff flys-aft/src/main/resources/sql/aft-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 2b7f44c80857
children 7a68967ca72a
line wrap: on
line diff
--- a/flys-aft/src/main/resources/sql/aft-common.properties	Mon Mar 11 12:55:09 2013 +0100
+++ b/flys-aft/src/main/resources/sql/aft-common.properties	Tue Mar 12 19:15:18 2013 +0100
@@ -16,4 +16,10 @@
 select.tafelwert = \
     SELECT TAFELWERT_NR AS id, WASSERSTAND AS w, ABFLUSS AS q FROM TAFELWERT \
     WHERE ABFLUSSTAFEL_NR = :number
-
+select.bfg.id.current = \
+    SELECT BFG_ID AS BFG_ID FROM ABFLUSSTAFEL \
+    WHERE GUELTIG_VON IN ( \
+        SELECT min(GUELTIG_VON) FROM ABFLUSSTAFEL \
+        WHERE GUELTIG_VON IS NOT NULL AND GUELTIG_BIS IS NULL \
+        AND MESSSTELLE_NR LIKE :number) \
+    AND MESSSTELLE_NR :number

http://dive4elements.wald.intevation.org