comparison flys-backend/doc/schema/oracle.sql @ 4651:83a42e6a562d

Added view for selecting ranges in wsts.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 06 Dec 2012 17:30:09 +0100
parents 948c7289fc42
children 20b6ebf23916
comparison
equal deleted inserted replaced
4650:31327b3b2455 4651:83a42e6a562d
471 wst_column_pos 471 wst_column_pos
472 FROM official_lines ol 472 FROM official_lines ol
473 JOIN q_main_values qmv 473 JOIN q_main_values qmv
474 ON ol.river_id = qmv.river_id 474 ON ol.river_id = qmv.river_id
475 AND ol.name = qmv.name; 475 AND ol.name = qmv.name;
476
477 CREATE VIEW wst_ranges
478 AS
479 SELECT wc.id AS wst_column_id,
480 wc.wst_id AS wst_id,
481 Min(wcv.position) AS a,
482 Max(wcv.position) AS b
483 FROM wst_columns wc
484 JOIN wst_column_values wcv
485 ON wc.id = wcv.wst_column_id
486 GROUP BY wc.id,
487 wc.wst_id;

http://dive4elements.wald.intevation.org