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?
Solved! Go to Solution.
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]%'
I can't replicate you [A-Z] what other options are there in the drop-down list beside it? maybe a NOT [1-9]
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....
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']
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?
I just have the 'thing' with Pro. I try something that is fairly routine and when it doesn't work I'm amused....
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]%'
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....