The Geography data type is used in many different SQL Server databases. It contains Latitude, Longitude, and many other properties and functions.
In this video I show you how to extract the latitude and longitude from the Geography data type.
Video: Latitude and Longitude with the Geography Data Type
How to extract the latitude and longitude from the Geography data type..
I use the Wide World Importers and the following scripts:
--SQL Geography Data Type select CityName ,Location.Lat Latitude ,Location.Long Longitude ,cast(location as varchar(max)) from Application.Cities
Link to the a good tutorial on MSSQLTips.com.
See the original Latitude and Longitude in SQL Server video.
António José Campos says
Hi. I have one code that I think it’s one of those, but I don’t have SQL Server or any similar. could you please check? 0xE6100000010C9E7CF5DE05EF31C0AA9137D3978C51C0
Many thanks.