Hi Bob,
No, SQL does not care about capitalization, it is used for humans to read each
others code. So I neglected to capitalize the OR, making it harder for you to
read, but the interpreter should do just fine.
Python on the other hand cares very much about capitalization and white space.
SQL does not care about white space either, so you can put extra spaces, tabs
and carriage returns in your code.
-Thayer
On Wednesday, July 7, 2021, 10:26:50 AM EDT, Basques, Bob (CI-StPaul)
<[email protected]> wrote:
Not a Capitalization thing?
Bobb
From: Qgis-user <[email protected]> On Behalf Of Thayer Young
Sent: Wednesday, July 7, 2021 9:23 AM
To: [email protected]
Subject: [Qgis-user] Select by Expression: exclusive (not inclusive)
|
Think Before You Click:This email originated outsideour organization.
|
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:
"tag_service" IS NULL or "tag_service" NOT IN ('alley', 'drive-through',
'driveway', 'laneway','parking_aisle', 'parking')
-Thayer
From: Andrew Hughes <[email protected]>
To:[email protected]
Subject: [Qgis-user] Select by Expression: exclusive (not inclusive)
Message-ID:
<CAMvYC1Xs=yaxj6os5vfnnnav_v60tjcqbaut-ygdnutoc6k...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Hi All,
I can't for the life of me figure out why I can't "Select all features that
are *NOT* an alley, drive-through, driveway.... "
I am trying to use "Select by Expression".
The attribute I am trying to filter with is called "tag_service" and has 77
distinct values, including NULL.
*Q: Why does this expression select nothing?*
*"tag_service" NOT IN ('alley', 'drive-through', 'driveway', 'laneway',
'parking_aisle', 'parking')*
Supplementary, the following does select records (but I want the above
expression to work):
*"tag_service" IS NULL or "tag_service" = "service"*
Help would be much appreciated,
Thank you
Andrew
_______________________________________________
Qgis-user mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user