diff gnv-artifacts/doc/conf/queries.properties @ 206:01ac348ac4a4

Optimized Query horizontalprofile_instantaneouspoint_cruise because it is not warranted that the name of an cruise is set. issue60 gnv-artifacts/trunk@262 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Fri, 23 Oct 2009 07:37:39 +0000
parents 6e7952fd1744
children d5cef9f17525
line wrap: on
line diff
--- a/gnv-artifacts/doc/conf/queries.properties	Thu Oct 22 14:02:30 2009 +0000
+++ b/gnv-artifacts/doc/conf/queries.properties	Fri Oct 23 07:37:39 2009 +0000
@@ -379,19 +379,26 @@
     ORDER BY V.NAME
 horizontalprofile_instantaneouspoint_cruise = SELECT DISTINCT \
         C.CRUISEID KEY , \
-        C.NAME VALUE \
+        V.NAME || ' ' || \
+        C.NAME || ' ' || \
+        TO_CHAR(C.STARTDATE,'DD.MM.YYYY') || ' - ' || \
+        TO_CHAR(C.ENDDATE,'DD.MM.YYYY') VALUE , \
+        V.NAME , \
+        C.NAME \
      FROM MEDIAN.CRUISE C, \
+         MEDIAN.VEHICLE V, \
          MEDIAN.TRACK T, \
          MEDIAN.SURVEYINFO S, \
          MEDIAN.INSTANTANEOUSPOINT I, \
          MEDIAN.MEASUREMENT M \
-    WHERE C.CRUISEID = T.CRUISEID AND \
+    WHERE C.VEHICLEID = V.VEHICLEID AND \
+          C.CRUISEID = T.CRUISEID AND \
           T.TRACKID = S.TRACKID AND \
           S.SURVEYID  = I.SURVEYID AND \
           I.FEATUREID =  M.FEATUREID AND \
           C.VEHICLEID  = ? AND \
           M.SOURCEID = ? \
-    ORDER BY C.NAME
+    ORDER BY V.NAME, C.NAME
 horizontalprofile_instantaneouspoint_track= SELECT \
         T.TRACKID KEY , \
         to_char(T.STARTDATE,'DD.MM.YYYY HH24:MI') || ' - '|| to_char(T.ENDDATE,'DD.MM.YYYY HH24:MI') || ' - '|| T.NAME VALUE \

http://dive4elements.wald.intevation.org