I try to use views with spatial column in spatialite. I can connect to spatialite database and load the layer without problems but when I try to view data in Attribute Table I can't get eny data; all rows and field show ERROR.

Data render well and information in point show correct data.

Has someone get the same error?. Is this a bug?

I get this results in different versions of qgis (osg4w in windows, master version in ubuntu 12.04 and qgis version included in osgeolive 6.0)

  • Did you add into the view an integer column called "ROWID"??
    – Micha
    Mar 23, 2013 at 12:19

1 Answer 1


As I've got a similar problem with Geopackage spatial views I thought I'd share what I've seen elsewhere. Some people are reporting that if you select both the ROWID column and geometry column and alias both using " as " in the view SQL, but give them aliases that are exactly the same as the column names, then this fixes the problem in Spatialite. This however doesn't seem to fix it in Geopackage.

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.