[Lada-commits] [PATCH] Added view for reachable status values
Wald Commits
scm-commit at wald.intevation.org
Wed Nov 18 15:58:19 CET 2015
# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1447858691 -3600
# Node ID 1cf168a038c9eb2b0066a14894948f75f8a3117c
# Parent 48fab56ae827609a3b22802223ef0b9db08c3ef6
Added view for reachable status values.
diff -r 48fab56ae827 -r 1cf168a038c9 db_schema/lada_schema.sql
--- a/db_schema/lada_schema.sql Wed Nov 18 15:40:00 2015 +0100
+++ b/db_schema/lada_schema.sql Wed Nov 18 15:58:11 2015 +0100
@@ -1836,6 +1836,24 @@
latitude double precision
);
+--
+-- Name status_erreichbar; Type: VIEW; Schema: stammdaten; Owner: -;
+--
+CREATE VIEW status_erreichbar AS (
+ SELECT DISTINCT k.wert_id,
+ j.wert_id AS cur_wert,
+ j.stufe_id AS cur_stufe
+ FROM stammdaten.status_kombi k
+ JOIN (SELECT r.zu_id,
+ kom.wert_id,
+ kom.stufe_id
+ FROM stammdaten.status_reihenfolge r
+ JOIN stammdaten.status_kombi kom
+ ON kom.id = r.von_id) j
+ ON j.zu_id = k.id
+);
+
+
SET search_path = bund, pg_catalog;
More information about the Lada-commits
mailing list