<div dir="auto">See MSSQLSpatial - Microsoft SQL Server Spatial Database — GDAL documentation<div dir="auto"><br></div><div dir="auto"><a href="https://gdal.org/drivers/vector/mssqlspatial.html">https://gdal.org/drivers/vector/mssqlspatial.html</a></div><div dir="auto"><br></div><div dir="auto">The MS SQL Spatial driver passes SQL statements directly to MS SQL by default, rather than evaluating them internally when using the ExecuteSQL() call on the OGRDataSource, or the -sql command option to ogr2ogr. Attribute query expressions are also passed directly through to MSSQL. It’s also possible to request the OGR MSSQL driver to handle SQL commands with the OGR SQL engine, by passing “OGRSQL” string to the ExecuteSQL() method, as the name of the SQL dialect.</div><div dir="auto"><br></div><div dir="auto">Since you are using -dialect sqlite, it is not clear (to me) who is executing the spatial commands. </div><div dir="auto"><br></div><div dir="auto">In MS SQL, the spatial command don't contain the '_' as elsewhere in spatialite and postgis. I also don't see a ST_Transform command listed. </div><div dir="auto"><br></div><div dir="auto">STAsText (geometry Data Type) - SQL Server | Microsoft Docs</div><div dir="auto"><br></div><div dir="auto"><a href="https://docs.microsoft.com/en-us/sql/t-sql/spatial-geometry/stastext-geometry-data-type?view=sql-server-ver15">https://docs.microsoft.com/en-us/sql/t-sql/spatial-geometry/stastext-geometry-data-type?view=sql-server-ver15</a></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><br></div></div>