[Qgis-developer] Filter layer after join, error/impossible
Hugo Mercier
hugo.mercier at oslandia.com
Fri Feb 20 08:56:22 PST 2015
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
More information about the Qgis-developer
mailing list