<html><head></head><body><div class="ydp1e9c2db1yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div></div>
        <div dir="ltr" data-setdir="false">As Marco has explained, QGIS expressions are based on SQL which means that if you use a null containing field in a statement the nulls will be excluded from the query results unless you specifically state that they should be included. So you need to say:</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false"><span><span style="color: rgb(38, 40, 42); font-family: Helvetica Neue, Helvetica, Arial, sans-serif;">"tag_service" IS NULL or </span></span><span style="color: rgb(38, 40, 42);">"tag_service" NOT IN ('alley', 'drive-through', 'driveway', 'laneway',</span><span style="color: rgb(38, 40, 42);">'parking_aisle', 'parking')</span></div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">-Thayer</div><div dir="ltr" data-setdir="false"> </div><div><br></div></div><div id="ydpf9e9583byahoo_quoted_6211684278" class="ydpf9e9583byahoo_quoted"><div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;"><div><div dir="ltr">From: Andrew Hughes <<a href="mailto:ahhughes@gmail.com" rel="nofollow" target="_blank">ahhughes@gmail.com</a>><br></div><div dir="ltr">To: <a href="mailto:Qgis-user@lists.osgeo.org" rel="nofollow" target="_blank">Qgis-user@lists.osgeo.org</a><br></div><div dir="ltr">Subject: [Qgis-user] Select by Expression: exclusive (not inclusive)<br></div><div dir="ltr">Message-ID:<br></div><div dir="ltr">    <CAMvYC1Xs=<a href="mailto:YaXj6Os5vfnnNAV_v60TJCQBauT-YgDnuToc6koMw@mail.gmail.com" rel="nofollow" target="_blank">YaXj6Os5vfnnNAV_v60TJCQBauT-YgDnuToc6koMw@mail.gmail.com</a>><br></div><div dir="ltr">Content-Type: text/plain; charset="utf-8"<br></div><div dir="ltr"><br></div><div dir="ltr">Hi All,<br></div><div dir="ltr"><br></div><div dir="ltr">I can't for the life of me figure out why I can't "Select all features that<br></div><div dir="ltr">are *NOT* an alley, drive-through, driveway.... "<br></div><div dir="ltr"><br></div><div dir="ltr">I am trying to use "Select by Expression".<br></div><div dir="ltr"><br></div><div dir="ltr">The attribute I am trying to filter with is called "tag_service" and has 77<br></div><div dir="ltr">distinct values, including NULL.<br></div><div dir="ltr"><br></div><div dir="ltr">*Q: Why does this expression select nothing?*<br></div><div dir="ltr"><br></div><div dir="ltr">*"tag_service" NOT IN ('alley', 'drive-through', 'driveway', 'laneway',<br></div><div dir="ltr">'parking_aisle', 'parking')*<br></div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr">Supplementary, the following does select records (but I want the above<br></div><div dir="ltr">expression to work):<br></div><div dir="ltr"><br></div><div dir="ltr">*"tag_service" IS NULL or "tag_service" = "service"*<br></div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr">Help would be much appreciated,<br></div><div dir="ltr"><br></div><div dir="ltr">Thank you<br></div><div dir="ltr">Andrew<br></div><div dir="ltr"><br></div></div>
            </div>
        </div></body></html>