Bug report #21554

query as view works in 2.14 LTR and does not in 3.4.5 LTR

Added by Lee Han about 5 years ago. Updated about 5 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Data Source Manager
Affected QGIS version:3.4.5 Regression?:No
Operating System:W10 Easy fix?:No
Pull Request or Patch supplied:No Resolution:duplicate
Crashes QGIS or corrupts data:No Copied to github as #:29370

Description

In data source manager, the query : select distinct e.*, c.code_dept from activite.emprise e join activite.communes c
on st_intersects(e.geom, c.geom)
where typemp not in ('prescrite', 'topographiée')
order by c.code_dept;
gives the same result in Qgis 2.14 and 3.4.5.

Loading it as a view failed in Qgis 3.4.5 with the message :
File "C:/OSGeo4W/apps/qgis-ltr/./python/plugins\db_manager\dlg_sql_window.py", line 396, in loadSqlLayer
layer = self._getSqlLayer(self.filter)
File "C:/OSGeo4W/apps/qgis-ltr/./python/plugins\db_manager\dlg_sql_window.py", line 358, in _getSqlLayer
query = self._getSqlExecutableQuery()
AttributeError: 'DlgSqlWindow' object has no attribute '_getSqlExecutableQuery'


Related issues

Duplicates QGIS Application - Bug report #21469: Error when adding query results via DB Manager Closed 2019-03-04

History

#1 Updated by Alessandro Pasotti about 5 years ago

#2 Updated by Giovanni Manghi about 5 years ago

  • Resolution set to duplicate
  • Status changed from Open to Closed

Also available in: Atom PDF