Bug report #16939
Join attributes by location gives error when mssql-layer is a view, not a table
|Affected QGIS version:||2.18.9||Regression?:||No|
|Operating System:||W7||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||not reproducable|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||24838|
When I use a mssql (2016)-layer that is a view (not a table) in the underlying database, to use the vector-datamanagement-tool 'Join attributes by location', and let it join the attributes on whatever layer (shapefile), it throws the error '__len__() should return >= 0 See log for more details'.
When I do the same thing, but with the same layer converted to a table in the same MSSQL-database as a shapefile, it does work.
I have examined this with pointlayers and line-layers, and both throw that error. No problem with tables or shapefiles. But always a problem with whatever view it is..