Select to view content in your preferred language

Subqueries with branch versioned data

115
1
Friday
AmyRoustCoL
Emerging Contributor

I have a "Pole" point feature class with a related "SignsParksRec" table to store signs on each pole. I created a definition query in the pole feature class in Pro so that only the poles that had a sign in a particular category would display. My query:

FacilityID IN (SELECT Pole_ID FROM SignParksRec WHERE bannercategory IS NOT NULL)

The definition query validates, but when I apply it, there are five poles that do not meet the query and still display. 

I've read the documentation on subqueries, but I wonder if I'm running into trouble because the data sources are branch versioned? I know when I do query layers, I have to add where clauses to only return the most recent record and not the archived ones.

0 Kudos
1 Reply
RichardDaniels
MVP Regular Contributor

At the simplest level, are you sure bannercategory is actually <Null> in the case of the poles that are showing, but that you believe have no assigned category? Recall, that '' or ' ' is not the same as NULL (the absence of a value). In ArcGIS Pro, you can set a field’s value to null using the Calculate Field tool, provided the field is nullable and stored in a geodatabase.

To set a field to <NULL> you can enter the text None in the Expression box.