Forum Discussion
SQL DB Error with geometry::STGeomFromText
- 4 months ago
When I created the ticket on Friday, it didn't run in the SQL Database or SQL Analytics Endpoint, but it did work in Fabric Warehouse (I tried that statement in all). I will close this out as solved now that it is working in SQL Database.
Hi MLingo ,
The behavior you are experiencing is expected with Microsoft Fabric SQL Database. Spatial and geometric functions, such as STGeomFromText, rely on Microsoft.SqlServer.Types components, which are not currently available in the Fabric SQL Database environment. Consequently, queries using these functions will succeed in Fabric Warehouse but encounter assembly loading errors in SQL Database.
While documentation may indicate SQL Database in Fabric as applicable, feature support is not yet consistent across all Fabric platforms. Currently, spatial data types like geometry and their associated methods are supported only in Fabric Warehouse, not in SQL Database.
Your query is correct; the limitation is due to the platform. If spatial operations are required for your workload, it is recommended to run these queries in Fabric Warehouse or handle spatial processing outside SQL Database until support becomes available in a future update.
Thank you.