<span class="Apple-style-span" style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; background-color: rgba(255, 255, 255, 0.917969); "><div class="im" style="color: rgb(80, 0, 80); "><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<span style="background-color: rgb(255, 255, 255); ">It works if I use the query builder from the attribute table, and will select the features that match the query (and highlight them on the map/attribute table).</span></blockquote>
<div><br></div></div><div>Yeah this will work because it is at a QGIS level. Not so much a query rather a "find all the items in the big index in the attribute table". QGIS has a model it keeps all the values and fields in, when you use the search string it just looks everything up in this big index and selects it. Never really goes to the provider, not for searching anyway.</div>
<div class="im" style="color: rgb(80, 0, 80); "><div><br></div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<span style="background-color: rgb(255, 255, 255); ">If I use rule based styling I can also select things by attribute and style by attribute.</span></blockquote><div><br></div></div><div>This is on a QGIS level too. QGIS will check each feature in the current extent to see if the expression passes, but the expression parser works on QGIS fields and features (objects) rather then giving the work to the provider.</div>
<div class="im" style="color: rgb(80, 0, 80); "><div><br></div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<span style="background-color: rgb(255, 255, 255); ">If I use the right click menu on the layer with the join and select Query... (or Layer > Query... from the menu) this is where it will not return any results.</span></blockquote>
<div><br></div></div><div>Mainly, like I said above, that QGIS is pretty much saying to the provider "here is a expression string, filter your dataset and give me back a filtered set" then provider gets the string with the joined field (that it doesn't have) and goes "hey! I can't do anything with this. Have a null dataset". </div>
<div><br></div><div>IMO would should rename Query to something like Set Subset or Filter (more conventional).</div><div><br></div><div>- Nathan</div></span>