diff flys-aft/src/main/resources/sql/aft-common.properties @ 4775:d9f1202cef78

Do the pairing of FLYS and AFT discharge tables by the field 'ABFLUSSTAFEL.BFG_ID' in AFT and 'discharge_table.bfg_id' in FLYS. TODO: Create new column in discharge_tabel.
author Sascha L. Teichmann <teichmann@intevation.de>
date Sat, 05 Jan 2013 14:52:55 +0100
parents 9dcc32fc5167
children 2b7f44c80857
line wrap: on
line diff
--- a/flys-aft/src/main/resources/sql/aft-common.properties	Sat Jan 05 13:46:27 2013 +0100
+++ b/flys-aft/src/main/resources/sql/aft-common.properties	Sat Jan 05 14:52:55 2013 +0100
@@ -3,11 +3,15 @@
     SELECT NAME, MESSSTELLE_NR \
     FROM MESSSTELLE \
     WHERE GEWAESSER_NR = :GEWAESSER_NR AND STATIONIERUNG BETWEEN :START_KM AND :END_KM
-select.abflusstafel = SELECT ABFLUSSTAFEL_NR, \
-                             ABFLUSSTAFEL_BEZ, \
-                             strftime('%s', GUELTIG_VON) * 1000 AS GUELTIG_VON, \
-                             strftime('%s', GUELTIG_BIS) * 1000 AS GUELTIG_BIS, \
-                             PEGELNULLPUNKT FROM ABFLUSSTAFEL WHERE MESSSTELLE_NR LIKE :number
+select.abflusstafel = \
+    SELECT ABFLUSSTAFEL_NR, \
+           ABFLUSSTAFEL_BEZ, \
+           strftime('%s', GUELTIG_VON) * 1000 AS GUELTIG_VON, \
+           strftime('%s', GUELTIG_BIS) * 1000 AS GUELTIG_BIS, \
+           PEGELNULLPUNKT, \
+           BFG_ID \
+    FROM ABFLUSSTAFEL \
+    WHERE MESSSTELLE_NR LIKE :number
 select.tafelwert = SELECT TAFELWERT_NR AS id, WASSERSTAND AS w, ABFLUSS AS q FROM TAFELWERT \
                           WHERE ABFLUSSTAFEL_NR = :number
 

http://dive4elements.wald.intevation.org