Select to view content in your preferred language

ArcGIS Pro- Definition Query- Performing Opposite Query Than Expected

179
4
Thursday
Amanda__Huber
MVP Regular Contributor

Hello, 

We recently found a strange query issue in ArcGIS Pro 3.6.2 . When running a query with "does not contain the text" nothing is selected, but running a query that says "does not include the values" it does select the values that are opposite of the query. This seems like a strange bug. 

The data is hosted in AGOL. 

(view in My Videos)

If anyone has insight into this behavior that would be great. Considering opening an Esri support case for this too but wanted to check here first. 

Thanks, 
Amanda Huber

4 Replies
JonM32
by
Frequent Contributor

@Amanda__Huber 

It might have to do with what type of field the SQL is run on. For example, text vs integer. I would suggest looking into that looking into this.

Cheers,
Jon
If this response helps or is the solution to your post, please consider marking it as a solution
0 Kudos
Amanda__Huber
MVP Regular Contributor

Hey @JonM32 , 

Thanks for your response! This is a Text Field so that's why I'm confused why a "contains" doesn't work and the other expression results in the opposite (?) 

 

Thanks, 

Amanda

JoshuaBixby
MVP Esteemed Contributor

Can you describe your data schema and some examples in text here?  Can you also share the SQL that each query is generating?  A video is better than a screenshot, but I personally won't usually take the time to watch a video, and I am guessing there are plenty others on the forum that do the same, or don't in this case.

0 Kudos
Neal_t_k
MVP Regular Contributor

I have run into this before, I had to address the "null" values separately,  so "does not include the text" or "is null"   I assume it has to do with it being null and does not have anything to evaluate against.

edit:NULL is NOT LIKE and NOT NOT LIKE | Ajarn Mark Caldwell Blog

 

When you put "does not include the values" is looking for "FR" as a value and not part of the value.  So since none of the values are exactly "FR" they are all selected. And again null would need to be addressed separatly.

0 Kudos