# HG changeset patch # User mschaefer # Date 1528093945 -7200 # Node ID ee77e544e8900da894441b70c20c51bec0d2729a # Parent 928cc44711dbac4626db9b59172859c666f2e2fd Where clause in bed-heights-statement extended by km range condition diff -r 928cc44711db -r ee77e544e890 artifacts/doc/conf/meta-data.xml --- a/artifacts/doc/conf/meta-data.xml Fri Jun 01 17:42:20 2018 +0200 +++ b/artifacts/doc/conf/meta-data.xml Mon Jun 04 08:32:25 2018 +0200 @@ -2114,9 +2114,9 @@ '<BR>ursprüngliches Höhensystem: ' || old_em.name || '<BR>Strecke: ' || round(r.a, 1) || '-' || round(r.b, 1) || '<BR>Auswerter: ' || bhs.evaluation_by AS info, - bhv.height_count AS bedh_height_count, - bhv.min_count AS bedh_min_count, - bhv.max_count AS bedh_max_count + COALESCE(bhv.height_count,0) AS bedh_height_count, + COALESCE(bhv.min_count,0) AS bedh_min_count, + COALESCE(bhv.max_count,0) AS bedh_max_count FROM bed_height bhs JOIN bed_height_type bht ON bht.id = bhs.type_id JOIN location_system ls ON ls.id = location_system_id @@ -2125,8 +2125,9 @@ ON old_em.id = old_elevation_model_id LEFT JOIN ranges r ON r.id = range_id LEFT JOIN (SELECT bed_height_id, COUNT(height) AS height_count, COUNT(min_height) AS min_count, COUNT(max_height) AS max_count - FROM bed_height_values GROUP - BY bed_height_id + FROM bed_height_values + WHERE (station BETWEEN (${fromkm}-0.0001) AND (${tokm}+0.0001)) + GROUP BY bed_height_id ) bhv ON bhs.id = bhv.bed_height_id WHERE bhs.river_id = ${river_id}