comparison db_schema/lada_schema.sql @ 792:1cf168a038c9

Added view for reachable status values.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 18 Nov 2015 15:58:11 +0100
parents f2ae2d734b80
children e15c981fe310
comparison
equal deleted inserted replaced
791:48fab56ae827 792:1cf168a038c9
1834 plz character varying(6), 1834 plz character varying(6),
1835 longitude double precision, 1835 longitude double precision,
1836 latitude double precision 1836 latitude double precision
1837 ); 1837 );
1838 1838
1839 --
1840 -- Name status_erreichbar; Type: VIEW; Schema: stammdaten; Owner: -;
1841 --
1842 CREATE VIEW status_erreichbar AS (
1843 SELECT DISTINCT k.wert_id,
1844 j.wert_id AS cur_wert,
1845 j.stufe_id AS cur_stufe
1846 FROM stammdaten.status_kombi k
1847 JOIN (SELECT r.zu_id,
1848 kom.wert_id,
1849 kom.stufe_id
1850 FROM stammdaten.status_reihenfolge r
1851 JOIN stammdaten.status_kombi kom
1852 ON kom.id = r.von_id) j
1853 ON j.zu_id = k.id
1854 );
1855
1856
1839 1857
1840 SET search_path = bund, pg_catalog; 1858 SET search_path = bund, pg_catalog;
1841 1859
1842 -- 1860 --
1843 -- Name: id; Type: DEFAULT; Schema: bund; Owner: - 1861 -- Name: id; Type: DEFAULT; Schema: bund; Owner: -
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)