I’m looking for the MSSQL equivalent of the following mySQL statement:
SELECT Y(location) as Lat, X(location) as Lon from myTable;
I want to get the X and Y values of my geography I have stored as a geography data type.
I know STAsText(Location) as Location will give me the WKT… i just need the X and Y number values.
For GEOGRAPHY:
For GEOMETRY: