Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

extract latitude from dbgeography in sql query [closed]

Tags:

sql

sql-server

i have a dbgeography column in sql server which stores latitude and longitude information. I want to extract latitude or longitude information using sql query but i couldn't find a way to do so. How could it be done?

No C# code.

like image 822
desmondlee Avatar asked Sep 28 '22 23:09

desmondlee


1 Answers

Does something like this work?

select Location.Lat, Location.Long from GeographyTable
like image 124
nathancahill Avatar answered Oct 19 '22 22:10

nathancahill