SQL Training Online

  • Training Courses
  • Beginner Book
  • Blog

August 30, 2017 by Joey Blue 1 Comment

Latitude and Longitude with the Geography Data Type – SQL Training Online

The Geography data type is used in many different SQL Server databases. It contains Latitude, Longitude, and many other properties and functions.

In this video I show you how to extract the latitude and longitude from the Geography data type.

Video: Latitude and Longitude with the Geography Data Type


How to extract the latitude and longitude from the Geography data type..

I use the Wide World Importers and the following scripts:

--SQL Geography Data Type
select CityName
,Location.Lat Latitude
,Location.Long Longitude
,cast(location as varchar(max))
from Application.Cities

Link to the a good tutorial on MSSQLTips.com.

 

See the original Latitude and Longitude in SQL Server video.

Filed Under: SQL Tip Tagged With: Latitude, Longitude, SQL Cast, SQL Geography, SQL Server

Recent Posts

  • SQL Database Normalization – 1NF, 2NF, 3NF, and 4NF
  • SQL Joins Tutorial for Beginners – Inner Join, Left Join, Right Join, Full Outer Join – SQL Training Online
  • Zillow House Price Analysis from CSV Archive – #PowerBI 002
  • Learn Basic SQL – 1 Hour Training Course – SQL Training Online
  • Create Table Statement in SQL Server and Inserting Baseball Homerun Leader Dataset – SQL Training Online

Popular Posts

  • SQL Functions
  • SQL Jobs in Oracle and Microsoft SQL Server
  • Troubleshooting a SQL Join

Have Questions? Connect with me.

Link to my Facebook Page
Link to my Pinterest Page
Link to my Rss Page
Link to my Twitter Page
Link to my Youtube Page
Copyright © 2023 · SQLTrainingOnline.com · Consulting at EmbarkBlue.com