I have some data in SQL Server 2016 which contains a field type of REAL, and I have no control over changing the underlying schema. This is not in an Enterprise Geodatabase, but is a simple table containing a geometry field.

This is how it looks via SQL Server Management Studio:

enter image description here

We can see this appears similar to a float:

Adding the data into ArcMap/ArcGIS Pro via a Query Layer, it looks like this:
Flows through as a float but I have lost the scale

enter image description here enter image description here

Looking at the help - SQL Server data types supported in ArcGIS – suggests REAL field type is supported for view only (which is what I need).

enter image description here

However, I can't see where I can change any settings to ensure the full scale flows through.

Hoping this might be an easy one to solve and something basic I may have overlooked.


Simple. Change the query layer to use a CAST in the SELECT statement, to CAST the real fields to floats.

SELECT TOP (1000) [uniqueID], CAST(TrafficDensity AS numeric(10,5)) AS TrafficDensity,[geomColumn] FROM [database].[dbo].[TrafficDensity]

[1]: https://i.stack.imgur.com/JZegs.png

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.