Selection in ArcGIS Pro

189
7
Jump to solution
08-02-2019 12:24 PM
Highlighted
MVP Esteemed Contributor

Pro 2.4

Probably missing something painfully obvious but....

In arc gis pro, I want to select a field where the value begins with A-Z, so I create a clause like this:

but the results look like this:

I've got street names that start with A-Z as well as 1-9; how do I create an expression that gives me the results I'm after?

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
MVP Esteemed Contributor

Joe, now I see what you are pointing out.  File geodatabases don't support regular expression features using LIKE, you have to use SIMILAR TO.  See /blogs/tilting/2018/07/19/like-and-similar-file-geodatabases-and-pattern-matching.  What you want in Pro with file geodatabases is:

StreetName SIMILAR TO '[A-Z]%'

View solution in original post

Reply
0 Kudos
7 Replies
Highlighted
MVP Esteemed Contributor

I can't replicate you [A-Z] what other options are there in the drop-down list beside it? maybe a NOT [1-9]

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

You mean [A-Z] works for you?  Here's the dropdown I get:

In a SQL window I can go old school and get the numeric streets this way:

and named streets with:

But I was hoping to save the whales, feed the children, and end nuclear proliferation with built in Pro functionality.....  Maybe next week....

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

No it doesn't, Try <=Z.  I don't have anything see any sql thingy where you can slice the first character of the record and do an IN check.

Like this easy python test and return

a = 'abcd1fAb2gh3'
[i for i in a if i in string.ascii_letters]
['a', 'b', 'c', 'd', 'f', 'A', 'b', 'g', 'h']
Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

Joe, if you have expressions that work and you can manually put the SQL in, why are you wanting to only use the Pro SQL builder?

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

I just have the 'thing' with Pro. I try something that is fairly routine and when it doesn't work I'm amused....

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

Joe, now I see what you are pointing out.  File geodatabases don't support regular expression features using LIKE, you have to use SIMILAR TO.  See /blogs/tilting/2018/07/19/like-and-similar-file-geodatabases-and-pattern-matching.  What you want in Pro with file geodatabases is:

StreetName SIMILAR TO '[A-Z]%'

View solution in original post

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

Good catch.  Completely forgot about that which is how I came to use the less than approach some time ago.  Still amusing none the less: despite Pros advancements, the fgd query limitations remain. Classic example of the more things change, the more they stay the same....

Reply
0 Kudos