[PATCH] Removed AS for table aliases in infrastructure queries to avoid Oracle problem

Wald Commits scm-commit at wald.intevation.org
Mon Dec 2 09:25:06 CET 2019


# HG changeset patch
# User mschaefer
# Date 1575275078 -3600
#      Mon Dec 02 09:24:38 2019 +0100
# Node ID f96be528ee35edf5d13eed474738c629f3b4dfa2
# Parent  68d7b09a47b7ae8786b725a338ddac398c6d911c
Removed AS for table aliases in infrastructure queries to avoid Oracle problem

diff -r 68d7b09a47b7 -r f96be528ee35 artifacts/doc/conf/meta-data.xml
--- a/artifacts/doc/conf/meta-data.xml	Tue Nov 12 10:07:09 2019 +0100
+++ b/artifacts/doc/conf/meta-data.xml	Mon Dec 02 09:24:38 2019 +0100
@@ -1462,10 +1462,10 @@
       <dc:statement>
           SELECT s.id, MIN(s.filename) AS filename, MIN(s.group_id) AS group_id, MIN(g.name) AS group_label, 
             MIN(s.annotation_type_id) AS type_id, MIN(t.name) AS type_label
-          FROM (((infrastructure AS s INNER JOIN infrastructure_values AS v ON v.infrastructure_id = s.id)
-            INNER JOIN annotation_types AS g ON s.group_id = g.id)
-            INNER JOIN annotation_types AS t ON s.annotation_type_id = t.id)
-            INNER JOIN attributes AS rs ON v.attribute_id = rs.id
+          FROM (((infrastructure s INNER JOIN infrastructure_values v ON v.infrastructure_id = s.id)
+            INNER JOIN annotation_types g ON s.group_id = g.id)
+            INNER JOIN annotation_types t ON s.annotation_type_id = t.id)
+            INNER JOIN attributes rs ON v.attribute_id = rs.id
           WHERE (s.river_id = ${river_id})
             AND (v.station BETWEEN ${fromkm}-0.0001 AND ${tokm}+0.0001)
             ${infra_rs_clause}
@@ -1478,10 +1478,10 @@
       <dc:statement>
           SELECT s.id, MIN(s.filename) AS filename, MIN(s.group_id) AS group_id, MIN(g.name) AS group_label, 
             MIN(s.annotation_type_id) AS type_id, MIN(t.name) AS type_label
-          FROM (((infrastructure AS s INNER JOIN infrastructure_values AS v ON v.infrastructure_id = s.id)
-            INNER JOIN annotation_types AS g ON s.group_id = g.id)
-            INNER JOIN annotation_types AS t ON s.annotation_type_id = t.id)
-            INNER JOIN attributes AS rs ON v.attribute_id = rs.id
+          FROM (((infrastructure s INNER JOIN infrastructure_values v ON v.infrastructure_id = s.id)
+            INNER JOIN annotation_types g ON s.group_id = g.id)
+            INNER JOIN annotation_types t ON s.annotation_type_id = t.id)
+            INNER JOIN attributes rs ON v.attribute_id = rs.id
           WHERE (s.river_id = ${river_id})
             AND (v.station BETWEEN ${fromkm}-0.0001 AND ${tokm}+0.0001)
             AND (lower(rs.value) = 'links')
@@ -1494,10 +1494,10 @@
       <dc:statement>
           SELECT s.id, MIN(s.filename) AS filename, MIN(s.group_id) AS group_id, MIN(g.name) AS group_label, 
             MIN(s.annotation_type_id) AS type_id, MIN(t.name) AS type_label
-          FROM (((infrastructure AS s INNER JOIN infrastructure_values AS v ON v.infrastructure_id = s.id)
-            INNER JOIN annotation_types AS g ON s.group_id = g.id)
-            INNER JOIN annotation_types AS t ON s.annotation_type_id = t.id)
-            INNER JOIN attributes AS rs ON v.attribute_id = rs.id
+          FROM (((infrastructure s INNER JOIN infrastructure_values v ON v.infrastructure_id = s.id)
+            INNER JOIN annotation_types g ON s.group_id = g.id)
+            INNER JOIN annotation_types t ON s.annotation_type_id = t.id)
+            INNER JOIN attributes rs ON v.attribute_id = rs.id
           WHERE (s.river_id = ${river_id})
             AND (v.station BETWEEN ${fromkm}-0.0001 AND ${tokm}+0.0001)
             AND (lower(rs.value) = 'rechts')
@@ -1510,10 +1510,10 @@
       <dc:statement>
           SELECT s.id, MIN(s.filename) AS filename, MIN(s.group_id) AS group_id, MIN(g.name) AS group_label, 
             MIN(s.annotation_type_id) AS type_id, MIN(t.name) AS type_label
-          FROM (((infrastructure AS s INNER JOIN infrastructure_values AS v ON v.infrastructure_id = s.id)
-            INNER JOIN annotation_types AS g ON s.group_id = g.id)
-            INNER JOIN annotation_types AS t ON s.annotation_type_id = t.id)
-            INNER JOIN attributes AS rs ON v.attribute_id = rs.id
+          FROM (((infrastructure s INNER JOIN infrastructure_values v ON v.infrastructure_id = s.id)
+            INNER JOIN annotation_types g ON s.group_id = g.id)
+            INNER JOIN annotation_types t ON s.annotation_type_id = t.id)
+            INNER JOIN attributes rs ON v.attribute_id = rs.id
           WHERE (s.river_id = ${river_id})
             AND (v.station BETWEEN ${fromkm}-0.0001 AND ${tokm}+0.0001)
           GROUP BY s.id


More information about the Dive4Elements-commits mailing list