[Qgis-user] qgis - virtual layers

David_James david at djames.org.uk
Thu Jun 15 08:06:29 PDT 2017


Jozef Riha wrote
> hello list,
> 
> not sure if this is a known problem but during virtual layers feature
> testing i discovered that this tool has issues when source used in query
> contains characters such as space, forward slash, dash and possibly others
> in column names. it would be nice if user would be presented with a
> meaningful error message rather than a cryptic message about syntax error.
> 
> to reproduce:
> - import test.geojson to qgis
> - add virtual layer - run select * from test
> - you'll get:
> 
> Query execution error on DROP TABLE IF EXISTS "test"; CREATE VIRTUAL TABLE
> "test" USING QgsVLayer(test20160305235656402);: 1 - near "1": syntax error
> 
> br, j

Replying to a message that is over a year old ...

Virtual layer creation also errors with a cryptic error message if a column
name is "Update" - I suspect it will fail if column names are any SQL
reserved words. 

This is probably obvious, but it has taken me a couple of hours to realise
what the problem was and I would probably have never realised if Google had
not found Jozef Riha's posting for me.

(QGIS 2.18.2 on Windows)





--
View this message in context: http://osgeo-org.1560.x6.nabble.com/qgis-virtual-layers-tp5254623p5324368.html
Sent from the QGIS - User mailing list archive at Nabble.com.



More information about the Qgis-user mailing list