Created
July 19, 2016 01:30
-
-
Save rms1000watt/6145b357b7110fdc69c76c3c4a70aa58 to your computer and use it in GitHub Desktop.
SQL Server Lat Long to Geography
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- http://www.sql-server-helper.com/sql-server-2008/convert-latitude-longitude-to-geography-point.aspx | |
UPDATE [Table1] | |
SET [GeoLocation] = geography::STPointFromText('POINT(' + CAST([Longitude] AS VARCHAR(20)) + ' ' + CAST([Latitude] AS VARCHAR(20)) + ')', 4326) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment