Bug report #12638
ORDER BY clause in filter does not accept quoted field names
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||wontfix|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||20753|
Trying to order my shapefile point data in QGIS 2.4 (Debian testing version) for proportionate symbol mapping in order to have the largest symbols below the smallest, I use the following clause in the layer's filter:
1=1 ORDER BY "pop_2001" desc
This however gives me
OGR  error 1: SQL Expression Parsing Error: syntax error
When I leave out the quotation marks (inserted automatically by the GUI):
1=1 ORDER BY pop_2001 desc
everything works as expected.
I don't have this problem when I access a postgis table via the OGR provider, i.e. I can use quoted field names there.
However, when I access the same table via the postgis provider, the result of the query is empty !
So the whole thing seems to be provider specific...