-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DB Manager - load sql query as layer with geom column #28494
Comments
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Patrice V (Patrice V) I forgot to tell this : it's working when i choose a "raw" table in spatialite db, but not when a choose a view... Regards, |
Author Name: Phillip Shelton (Phillip Shelton) I too have seen this problem. SELECT mt.field1, mt.field2, mt.geom FROM mytable AS mt This query will only load as a non spatial table. However, SELECT mytable.field1, mytable.field2, mytable.geom FROM mytable will load as spatial table. |
Author Name: Alessandro Pasotti (@elpaso)
|
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Phillip Shelton (Phillip Shelton) Hi, Thank you Alessandro for so quickly fixing the use case I pointed out. Unfortunately, that was only a simple case of the problem. The following query still fails to load as a layer. I have tested this using the nightly builds (QGIS code revision a395aff) I can also confirm that this is a regression as the same query does load in version 3.2 (QGIS code revision 9b17680) select fe.geometry, fe.A_node, fe.B_node, fe.ass_Volume as feab, fe1.ass_Volume as feba, fm.ass_Volume as fmab, fm1.ass_Volume as fmba, To test:
Sorry Giovanni, I am saying that for me this bug has not been resloved, and the status should be moved back to at least In Progress or even Open. Is there any other file or data that I can supply that would help in tracking down the cause of this behaviour? I am also going to open a new duplicate of this just in case being closed means that this thread is not being viewed anymore.
|
Author Name: Alessandro Pasotti (@elpaso)
|
Author Name: Phillip Shelton (Phillip Shelton) Thank you, I greatly appreciate your attention to this problem. (again) |
Author Name: Patrice V (Patrice V) Sorry... I downloaded the last qgis dev and the bug still not fixed. I'll try to explain my problem more accurately. In db manager : 2 - Then I check "load as a new layer" 3 - Then I check "geometry column" and choose "geom" NB : the log tell this :
|
Author Name: Alessandro Pasotti (@elpaso) Yep, that's the effect of mixing things: I focused on aliases and joins and forgot about the views: fixed in #8706 Btw, views are only supported in DB manager and are not available in the browser nor in the source select dialog, would you mind checking if there is already an issue for that and file a new one if not? For the record: these are the (all passing) test cases:
|
Author Name: Alessandro Pasotti (@elpaso)
|
Author Name: Patrice V (Patrice V) Thanks a lot !! |
Author Name: Patrice V (Patrice V)
Original Redmine Issue: 20674
Affected QGIS version: 3.4.2
Redmine category:db_manager
Assignee: Alessandro Pasotti
Hi,
I'm on win7 64bits, on qgis 3.4.2
I use DB Manager with a spatialite file.
I use the request editor to make a sql request.
When I use "load as a new layer", it works when i don't check "geometry column", but it fails when i check it.
The same operation is working on 2.18.
Regards
The text was updated successfully, but these errors were encountered: