I currently have a task where I need to compare distances of latitude and longitude for specific locations and I have an Excel spreadsheet that has lots of data on latitude and longitude and need to convert those data type into geography
.
The problem is, before finding out the distances, I need to convert the columns to geography
. I tried using import wizard to SSMS but unfortunately, I do not have the option to change the data type to geography. Putting the data type to decimal
and trying to change manually will give of an error:
Explicit conversion from data type decimal to Test.sys.geography is not allowed.
I thought of creating a table manually but the problem is the number of rows that the latitude and longitude have is HUGE.
Please assist me on the ways I could do to convert the column to geography
.