I need to find all featuress in the zone_code field that begin with N
I entered the sql as zone_code LIKE 'N%' Pro remind me with a wrong expression, this sql i can succeed with database query statement, but failed in pro.
In addition, I entered zone_code LIKE 'N0%' also failed, only zone_code LIKE 'N01%' can be executed successfully. Why is that?
Why is it that all other letters work but N% is invalid?
Hi,
What kind of database do you use for querying?
On enterprise database and FGDB it works, on shape file doesn't.
P.s. After restart of ArcGIS Pro it works on shapefile too.
i use enterprise database.I don't know why only this N% is not working
You can add one line of code to your add-in to check what is your database wildcard symbol is.
string wildChar = geodatabase.GetSQLSyntax().GetSpecialCharacter(SQLSpecialCharacter.WildcardManyMatch);
is %.
sir, I just did the test
The layer object I query is created by new featureservice url, if I add the current layer directly to the database table for like %N query it is valid.
Maybe the layer object created by featureservice url does not support this query.
Hello Chapin,
Have you tried other like wildcards? Here is a technical support article:
https://support.esri.com/en/technical-article/000010066
thanks.maybe featureservice layer does not support this like query.
What does Pro show you when you click "View Details" on the error response?
Also, what database is your SDE in? Postgres? Oracle? MSSQL?
sir.
my database is SQLServer.
But the Layer object I query is created by new featureservice url.
According to the test result, the featureservice layer seems to have some problems with this kind of query, some layers are valid, some will prompt the sql statement is invalid.