AnsweredAssumed Answered

Changing Binary to Geometry?

Question asked by jazmateta on Jan 9, 2020
Latest reply on Jan 9, 2020 by jazmateta

Hi All,

Have just been attempting to create some views in my SDE(s) and it is failing.  I'm attempting to create a new column in the view that is a calculation on the length of the segment for streets to be used in a dashboard since Arcade can't be used there yet.  Part of the view is Select ... streets.object_id, streets.shape, streets.shape.len, (streets.shape.len/5280) centerlinemiles from ....

 

Error message is:  Cannot call method on int.  When I look at my base table in SSMS in design mode, for the Shape column it is showing int rather than geometry or geography.  I believe that this is referring to binary.

 

As a test, I copied the same feature class into a new test db and it came in as geometry and the select statement works after changing the shape.len to shape.STLength().  This was a V10.6.1 geodatabase.

 

The original database was created in 9.0 (or even 8.2) many years ago and upgraded to 10.0 and then 10.3.1.  I believe that this is part of the issue.

 

Using information from another thread asking how you can tell which version you are using, I have found a mixture of geometry and binary in the SAME database!  Didn't think this was possible.

 

So is there a way to convert the entire database to the same - likely geometry (we are using state plane coords) or best recommended?

 

I do see one way of doing it, create a new db on another server (want to maintain the same name and since ESRI doesn't allow for renaming of the db...), then copy all of the data into this new db, then recreate any replicas that allow for updates of deltas.  But this seems to be a long drawn out process.  I'm thinking this needs to be done on all of our databases.

 

Thanks,

Lorinda

Outcomes