Bug report #11116
Better support of dynamic queries on Oracle provider
|Affected QGIS version:||2.4.0||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||end of life|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||19446|
since QGis 2.4, we can load our own queries (sub-queries) instead of tables.
The queries can be added in a QGS project file by replacing the name of the table with the content of the query, enclosed by parenthesis.
QGis can open those queries and show the data on the canvas map but it emits an error log in the following form:
SQL : SELECT DISTINCT t."GEOM".SDO_GTYPE,t."GEOM".SDO_SRID FROM (SELECT "GEOM" FROM ""."(SELECT GID, GEOM FROM TEST_QGIS_S
)" WHERE "GEOM" IS NOT NULL AND rownum<=100) t WHERE NOT t."GEOM" IS NULL
erreur : ORA-01741: illegal zero-length identifier
Impossible de préparer la déclaration
The problem is that this query is not valid to Oracle. I believe that this query is made by QgsOracleConn::retrieveLayerTypes method when trying to determinate the geometry type.
According to the code, the query only handle table names and not query definitions.
This query should be modified to handle subqueries by deleting the quotes and the dot and ommitting the owner (layerProperty.ownerName).
Thanks for fixing this (non blocking but just annoying) bug in order to increase dynamic SQL queries support of QGis...
#3 Updated by Giovanni Manghi almost 2 years ago
- Resolution set to end of life
- Status changed from Open to Closed
End of life notice: QGIS 2.18 LTR