I have two separate Columns, one for Lat and one for Long. What I need to do is to cast both into a third column that I have called Shape and is of type Geometry.
I was able to find the below as to how to cast into geometry but am unaware if this is the best way. Is also like suggestions as to how to drop it into the third column.
SELECT *, geography::STGeomFromText('POINT(' + CAST([longitude] AS VARCHAR(20)) + ' ' + CAST([latitude] AS VARCHAR(20)) + ')', 4326) as GEOM, geography::Point([latitude], [longitude], 4326) as SAME_GEOM FROM **table** WHERE ('latitude' <> 0) AND ('longitude' <> 0) AND ('latitude' IS NOT NULL) AND ('longitude' IS NOT NULL)