Filter a string field by its length

978
2
Jump to solution
10-11-2023 07:22 AM
AngelaSchirck
Frequent Contributor

I have a parcels layer and a table widget in EB developers ed 1.12 (latest release).  I have 10-digit parcel numbers and 17-digit parcel numbers, but they are in the attribute table as strings.  I need to filter out all 10-digit parcel numbers, but the filter widget does not allow for writing your own SQL statement (this would be a very simple task if it would). When I use the "build sql expression" tool for parcel number my choices are:

AngelaSchirck_0-1697033992011.png

(the last choice not see is "is not blank.")

Does anyone know a way to filter out these nearly 2800 10-digit parcel numbers without entering them one-by-one? 

ESRI: Can you PLEASE add an option to edit/type your own SQL statement in the filter widget??

 

0 Kudos
1 Solution

Accepted Solutions
JeffreyThompson2
MVP Regular Contributor

Try Contains _________________

That is 17 underscore characters. Underscore is the single character wildcard in SQL.

https://www.w3schools.com/sql/sql_wildcards.asp

GIS Developer
City of Arlington, Texas

View solution in original post

2 Replies
JeffreyThompson2
MVP Regular Contributor

Try Contains _________________

That is 17 underscore characters. Underscore is the single character wildcard in SQL.

https://www.w3schools.com/sql/sql_wildcards.asp

GIS Developer
City of Arlington, Texas
AngelaSchirck
Frequent Contributor

Perfect! Thanks!

0 Kudos