Reputation: 21
I have added a new column to my locations database table called geo_loc
.
I have run the script convert the values in the long / lat columns to create the geography point for each set of long / lat
The geography column in the table now displays the value ?? Not sure how I get to see the actual contents of the geography column.
Also when I try and run the code to read the long / lat values from the geography column eg
select geo_loc.lat
from locations
SQL Server generates an error message
column not find the lat value in the geography assembly
If anyone can shed some light on the above I would be very grateful
Upvotes: 1
Views: 3119
Reputation: 32737
Because the geospatial data types are implemented as CLR, the method names (like Lat) are case sensitive. So, you need to use geo_loc.Lat
and geo_loc.Long
.
Upvotes: 3