I’m trying to return an XML from a table which holds a Geography type.
SQL query:
SELECT *
From Events
ORDER BY HydrantId ASC
FOR XML RAW ('Event'), ROOT ('Events'), ELEMENTS XSINIL;
I’m getting the following error:
FOR XML does not support CLR types -
cast CLR types explicitly into one of the supported types in FOR XML queries.
How can I cast this Geography column to something which is readable?
Thanks.
The value in
GeographyColumnwill be in thePOINT (-77.010996 38.890358)format.