Mercurial > dive4elements > river
diff flys-backend/doc/schema/postgresql.sql @ 754:5bcf338eadb9
Added a new view to select ws of a WST.
flys-backend/trunk@1986 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 24 May 2011 10:49:14 +0000 |
parents | ce9c6f05f464 |
children | a29fd0916803 |
line wrap: on
line diff
--- a/flys-backend/doc/schema/postgresql.sql Mon May 23 15:01:58 2011 +0000 +++ b/flys-backend/doc/schema/postgresql.sql Tue May 24 10:49:14 2011 +0000 @@ -217,4 +217,15 @@ ORDER BY wcv.position ASC, wc.position DESC; +-- view to select the w values of a WST +CREATE VIEW wst_w_values AS + SELECT wcv."position" AS km, + wcv.w AS w, + wc."position" AS column_pos, + w.id AS wst_id + FROM wst_column_values wcv + JOIN wst_columns wc ON wcv.wst_column_id = wc.id + JOIN wsts w ON wc.wst_id = w.id + ORDER BY wcv."position", wc."position"; + COMMIT;