玉祥平台客服-15087858732

标题: Sql根据经纬度算出距离 [打印本页]

作者: 张兴康    时间: 2020-2-28 14:00

作者: fteair    时间: 2020-2-28 17:42

作者: fteair    时间: 2020-2-28 17:43

作者: fteair    时间: 2020-2-28 17:45

作者: fteair    时间: 2020-2-28 17:45

作者: fteair    时间: 2020-2-28 17:56
标题: Sql根据经纬度算出距离
SELECT  ISNULL((2 * 6378.137 * ASIN(SQRT(POWER(SIN((117.223372- ISNULL(Latitude,0) )*PI()/360),2)+COS(117.223372*PI()/180)*COS(117.223372*PI()/180)*POWER(SIN((117.223372- ISNULL(Longitude,0) )*PI()/360),2)))),0)   AS Distance  FROM RequirementOrder r where r.RequirementOrderID not in (SELECT O.RequirementOrderID from OrdersDetail O)





欢迎光临 玉祥平台客服-15087858732 (http://bbs.delit.cn/) Powered by Discuz! X3.2