OBJECTID in SQL Express table not matching ObjectID in ARCMAP/PRO

453
3
Jump to solution
09-22-2022 10:44 AM
CarrieQuast
New Contributor II

I'm trying to create a view based on a union between two datasets that are exactly the same format.  And it seems to work, except a newly added line segment is missing. 

After spending the morning I think I have it figured out why and its not the union, but  something to do with how SQL Express pulls records.  I'm not sure how to fix this.

The below information is just looking at the main table, no union.  

So this is the result when I look for one specific ID in SQL Express - notice that the OBJECTID is 2918, and pulls up 4th St (Not Correct)

CarrieQuast_0-1663867755182.png

Than in ArcPro (and ArcMap), the Object ID is 3820 (which is correct) and pulls 190th Ave (which is correct)

CarrieQuast_1-1663867823355.png

When I create a view and look at it in ArcPro, this 'shift' in the table is in that view.

For a bit of background, I have roads for our 911 system that is also used for run general day to day applications.  A few of these roads have multiple names.  Overlapping segments in the 911 system isn't allowed,  But for the rest of my users, they need to be able to see/have all the names, road classifications, etc.  So I have the main 911 roads unioned with the overlapping segments layer as a view in SQL Express and my general users can use this view.

I'm really new to this, so it very possible I'm missing something easy.

I'm running Windows Server 2016 Standard, and SQL Server Express, version 14

 

 

 

 

0 Kudos
1 Solution

Accepted Solutions
CarrieQuast
New Contributor II

So - I'm not sure if version was causing my union to miss the newest segment, but the pointer made me  look closer at the settings - I ran a GeoDatabase Compression on the database, and than added a secondary index in SQL Express.  Not sure which of these fixed the problem, but I got it working. 

View solution in original post

0 Kudos
3 Replies
JoshuaBixby
MVP Esteemed Contributor

If the data is versioned, you want to be querying the versioned views and not the base tables because the base tables might not represent the state of the data you are seeing in Pro.

0 Kudos
CarrieQuast
New Contributor II

They are versioned - I'll have to look into this!  

0 Kudos
CarrieQuast
New Contributor II

So - I'm not sure if version was causing my union to miss the newest segment, but the pointer made me  look closer at the settings - I ran a GeoDatabase Compression on the database, and than added a secondary index in SQL Express.  Not sure which of these fixed the problem, but I got it working. 

0 Kudos