Create virtual layer from OSM import fails on field names with : in them #24842
Labels
Bug
Either a bug report, or a bug fix. Let's hope for the latter!
DB Manager
Relating to the DB Manager core plugin
Author Name: Tim Bowden (@tbowden)
Original Redmine Issue: 16943
Affected QGIS version: 2.18.11
Redmine category:db_manager
Some OSM layers created in spatialite (using built in Vector/OSM menu) have colons in the field name. When trying to create virtual layers either with or without effected fields, an error is returned as such:
Query execution error on DROP TABLE IF EXISTS "rottnest_workshop_polygons"; CREATE VIRTUAL TABLE "rottnest_workshop_polygons" USING QgsVLayer(rottnest_workshop_polygons20170729144756312);: 1 - near ":disposal": syntax error
In this case, where ":disposal" is the remainder of the column name "toilets:disposal".
It is possible to change the column name as a temporary work around, but I'm trying to create a repeatable process where we can update with a fresh copy of the underlying OSM data and have all existing styling/layers etc "just work".
Has been checked on 2.14, 2.18.10 & 2.18.11.
Attached osm data file has tags that create such fields.
The text was updated successfully, but these errors were encountered: