[Qgis-developer] Filter layer after join, error/impossible
PIERRE Sylvain
sylvain.pierre at cg67.fr
Mon Feb 23 05:54:03 PST 2015
Thank's Hugo
Will the patch be include in next release (2.8.1)? And what about the "small function" to convert layer to virtual layer?
By the way, I've found a workaround:
1 begin first by filtering the "wanna be" joined table
2 perform join
3 Display only needed features by setting NoSymbol to other features in a rule-rendering style...
Sylvain
-----Message d'origine-----
De : qgis-developer-bounces at lists.osgeo.org [mailto:qgis-developer-bounces at lists.osgeo.org] De la part de Hugo Mercier
Envoyé : vendredi 20 février 2015 17:56
À : qgis-developer at lists.osgeo.org
Objet : Re: [Qgis-developer] Filter layer after join, error/impossible
Hi Pierre,
Le 20/02/2015 16:31, PIERRE Sylvain a écrit :
> Hi,
>
>
>
> I've same behaviour with different case :
>
> I want to filter a layer (Oracle/Postgis) after performing join with
> tabular data (Excel, MSSQL tested).
>
> First Filtering by Layer properties Ui is disabled (greyed button)
>
> Filtering possible by Menu "Layer"-"Filter"
>
> Joined fields appears, and Sample values do so.
>
> But when I want to test filter I got an error message box: (sorry in
> French)
>
> "Une erreur a été rencontrée lors de l'exécution de la requête.
>
> Le prestataire de donné a dit :
>
> ORA-00904: "V_SIG_SITE_Site_Nature" : identificateur non valide
>
> Impossible d'exécuter cette déclaration »
>
>
The filtering of a layer is done at the provider level, where nothing is known about the joined fields (they only exist QGIS side).
I've submitted a patch (1) to fix the UI issues: we will be able to filter on layers with joined fields, but only on fields of the primary table.
If you need to filter on joined fields, I am working on a "virtual layer" provider where you could use any SQL joins. A small function would allow to convert a layer with joins to a virtual layer and apply filtering on it.
More on this next week, hopefully ...
(1) https://github.com/qgis/QGIS/pull/1911
_______________________________________________
Qgis-developer mailing list
Qgis-developer at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer
More information about the Qgis-developer
mailing list