comparison 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
comparison
equal deleted inserted replaced
753:677a6fceea6e 754:5bcf338eadb9
215 JOIN wsts w 215 JOIN wsts w
216 ON wc.wst_id = w.id 216 ON wc.wst_id = w.id
217 ORDER BY wcv.position ASC, 217 ORDER BY wcv.position ASC,
218 wc.position DESC; 218 wc.position DESC;
219 219
220 -- view to select the w values of a WST
221 CREATE VIEW wst_w_values AS
222 SELECT wcv."position" AS km,
223 wcv.w AS w,
224 wc."position" AS column_pos,
225 w.id AS wst_id
226 FROM wst_column_values wcv
227 JOIN wst_columns wc ON wcv.wst_column_id = wc.id
228 JOIN wsts w ON wc.wst_id = w.id
229 ORDER BY wcv."position", wc."position";
230
220 COMMIT; 231 COMMIT;

http://dive4elements.wald.intevation.org