setDefinitionExpression & sql functions

549
2
Jump to solution
09-10-2018 04:47 PM
ZorbaConlen1
Occasional Contributor III

Hi,

I'd like to apply a def query to a feature layer in my app. I'm running into an issue, I think with the expression I'd like to use. It's a bit complicated in that it uses the IIF sql function (returns one of two values based on if a boolean expression evaluates to true or false). No error, but no results are returned and the same expression returns results in sql (ssms). I'm guessing there are limits on what sql functions one can use, but not finding any documentation of that.

Anyone know if it's documented as to what is valid expression?

Thanks

0 Kudos
1 Solution

Accepted Solutions
ZorbaConlen1
Occasional Contributor III

Thanks Robert. I wasn't sure if the standardized queries setting just applied to query tasks. Seems it applies also to def queries. I'll have to re-write the query since I'd rather not change the arcgis server setting.

View solution in original post

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus

Zorba,

  Here is some documentation on support SQL:

SQL reference for query expressions used in ArcGIS—Help | ArcGIS Desktop 

As far as I know IIF conditions are supported

Define parameters in a query layer—Query layers | ArcGIS Desktop 

One thing it depends on is the setting on ArcGIS for standardized queries:

About standardized queries—ArcGIS Server Administration (Windows) | ArcGIS Enterprise 

0 Kudos
ZorbaConlen1
Occasional Contributor III

Thanks Robert. I wasn't sure if the standardized queries setting just applied to query tasks. Seems it applies also to def queries. I'll have to re-write the query since I'd rather not change the arcgis server setting.

0 Kudos