changeset 8553:17c476e90c07

bed height differences datacage: only supply differences where subtrahend is older than minuend or year is unknown.
author "Tom Gottfried <tom@intevation.de>"
date Mon, 16 Feb 2015 08:39:06 +0100
parents fa57a2cb1dfa
children 3a0522f1a532
files artifacts/doc/conf/meta-data.xml
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/doc/conf/meta-data.xml	Mon Feb 16 15:31:17 2015 +0100
+++ b/artifacts/doc/conf/meta-data.xml	Mon Feb 16 08:39:06 2015 +0100
@@ -1886,7 +1886,8 @@
                      FROM   sta b1
                             JOIN sta b2
                               ON b1.station = b2.station
-                                 AND b1.id &lt;&gt; b2.id)
+                              AND b1.id &lt;&gt; b2.id
+                              AND (b1.year &gt; b2.year OR b1.year IS NULL))
             SELECT DISTINCT b1id, b1desc, b1year,
                    b2id, b2desc, b2year
             FROM   csta

http://dive4elements.wald.intevation.org