惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Fortinet All Blogs
小众软件
小众软件
大猫的无限游戏
大猫的无限游戏
B
Blog RSS Feed
WordPress大学
WordPress大学
A
About on SuperTechFans
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 司徒正美
I
InfoQ
MyScale Blog
MyScale Blog
量子位
博客园 - 【当耐特】
M
MIT News - Artificial intelligence
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - 三生石上(FineUI控件)
博客园 - 聂微东
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 叶小钗
J
Java Code Geeks
L
LangChain Blog
T
The Blog of Author Tim Ferriss
有赞技术团队
有赞技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
阮一峰的网络日志
阮一峰的网络日志

博客园 - kkun

audit message types system_call specifies the system call by its name AUDIT SYSTEM REFERENCE ausyscall --dump NodeJS http 模块 NodeJS package.json NodeJS Hello world NodeJS 安装 透过 HoloLens,微软抢先看到了个人计算机的未来 [MSSQL2005]再看CTE 博文阅读密码验证 - 博客园 博文阅读密码验证 - 博客园 [MSSQL2012]LEAD函数 [MSSQL2012]First_Value函数 [MSSQL2012]CUME_DIST函数 [MSSQL]SQL疑难杂症实战记录-巧妙利用PARTITION分组排名递增特性解决合并连续相同数据行 [ALM]一步一步搭建MS ALM环境 - 安装TFS + SQL SERVER [ALM]一步一步搭建MS ALM环境 - 安装域服务器 [Hyper-V]制作一个干净的操作系统模板
[MSSQL2008]Spatial Data in SQL Server 2008 - 根据经纬度计...
kkun · 2014-12-18 · via 博客园 - kkun

DECLARE @BJ GEOGRAPHY
DECLARE @XT GEOGRAPHY

/*
    GET Latitude/Longitude FROM here:http://www.travelmath.com/cities/Beijing,+China
    the distance unit in SRID 4326 is the meter
*/
SELECT @BJ = geography::Point('39.92889', '116.38833', 4326)
SELECT @XT = geography::Point('37.0630556', '114.4941667', 4326)

SELECT
    @BJ AS Beijing,
    @XT AS Xingtai,
    'The distance is ' +
    CAST(@BJ.STDistance(@XT)/1000 AS VARCHAR(MAX)) + ' km' AS Distance

image

------------------------------------------
除非特别声明,文章均为原创,版权与博客园共有,转载请保留出处
BUY ME COFFEE