I can do this:
And get result:
On the other hand, when I do this:
I get an error message:
Why query using function is working on numeric field and is not working on text in both shapefile and file geodatabase?
For a File Geodatabases you could use -
SUBSTRING(REGION FROM 1 FOR 3) = SUBSTRING(REG FROM 1 FOR 3)
For a Shapefile use:
SUBSTRING(REGION, 1, 3) = SUBSTRING(REG, 1, 3)
I got the shapefile syntax from this Technical Article - HowTo: Compare a field with a substring in another field
"marks around your field name. Works fine on a gdb layer, but not a shapefile with the quote marks, possibly becauseLEFTalso works on text e.g."Region""Region" LIKE 'Auc%'instead