Definition query not being honored

2203
4
Jump to solution
08-16-2021 08:58 AM
Labels (3)
JoeBorgione
MVP Emeritus

ArcGIS Pro 2.7.3

I am unable to get a definition query to work at all.  No matter what attribute I try or value(s) it just isn't honored:

JoeBorgione_0-1629129102443.pngJoeBorgione_1-1629129182465.png

I can create a selection query and that works:

JoeBorgione_2-1629129285897.png

Is this a known problem in 2.7.3?  I'm planning on an update to 2.8.2 today.  Maybe I'll do that sooner than later....

That should just about do it....
0 Kudos
1 Solution

Accepted Solutions
Wolf
by Esri Regular Contributor
Esri Regular Contributor

Are you using the Pro SDK to define the 'definition query'?  You should see on the bottom of the dialog the current active 'definition query', as shown on the screen shot below.  Can you share what RDMS you are using and also a sample of you 'definition query' in sql format?  If you use the Pro SDK can you share a code snippet for your 'definition query'?  

Wolf_0-1629132401862.png

 

View solution in original post

4 Replies
Wolf
by Esri Regular Contributor
Esri Regular Contributor

Are you using the Pro SDK to define the 'definition query'?  You should see on the bottom of the dialog the current active 'definition query', as shown on the screen shot below.  Can you share what RDMS you are using and also a sample of you 'definition query' in sql format?  If you use the Pro SDK can you share a code snippet for your 'definition query'?  

Wolf_0-1629132401862.png

 

BrettJenkinson
New Contributor II

I'm having this same issue but this solution did not work. The query box says that my query is active, yet it is showing other data within the layer that clearly do not fit the specified query. My select by attribute option also functions properly. Not sure what the issue is.

0 Kudos
Wolf
by Esri Regular Contributor
Esri Regular Contributor

Can you provide the version of Pro you're using, a screenshot of the SQL Query that is not working, and sample of the rows that are displayed (use the Attribute table for that) even so they don't fulfill the query condition?

0 Kudos
JoeBorgione
MVP Emeritus

OMG that's embarassing....  😖

That should just about do it....
0 Kudos