I am working with spatial data stored in an MSSQL 2012 database as varbinary. I am able to view the spatial data in SSMS with the following query:
SELECT geometry::STGeomFromWKB([column_name], 4955) FROM table_name;
How can I view this data in QGIS? I have successfully connected to the database in QGIS and have tried to run a similar spatialite sql query on the table as a virtual layer, but it does not work.
I have also tried to add the table to the geometry_columns table. QGIS will recognize it as a spatial layer once I drag the table in from the database, but nothing renders. It still shows up as a nonspatial table in the MSSQL connection.
A user with a similar question created a view in MSSQL, but reported that it could not be imported to QGIS.
In SSMS the records look like '0x001110310...'etc., and in QGIS they are all 'BLOB'.