I have views stored in a spatialite database accessed via QGIS. The views were created by another person on a different computer. The geometry column is well registered in the table views_geometry_columns but when I add the view to the canvas with DB Manager It's seems to just be an attribute table without geometry. I've tried the classical SELECT UpdateLayerStatistics('view_name') but it doesn't change anything.

Any solution(s) ?

  • Is there a unique ID column? I have had a similar problem using PostgreSQL (with QGIS and ArcMap). I needed to add an ID column casted to integer. With PostgreSQL, it looked like that: (ROW_NUMBER() OVER())::integer AS id Commented Nov 20, 2017 at 16:53

1 Answer 1


I had a similar issue and wrote out steps on how to load it properly using DB Manager here. Spatialite view appears 'filtered' in attribute table, won't load in canvas Give that a go?

As @Gob Tron mentioned you need the view to have a unique ID column and this has to be specified. And the geometry mysteriously does turn up empty in QGIS 2.18.x but it's still there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.