SELECT name, address1, address2, address3, city, state, zip, faxnum, phonenum, emailaddress,
odbcadmin.fn_calDist(- 0.03715491813985, 0.9178158214586024, long * 0.0174532925, lat * 0.0174532925)
AS distances
FROM dbo.Customer
WHERE (odbcadmin.fn_calDist(- 0.03715491813985, 0.9178158214586024, long * 0.0174532925, lat * 0.0174532925) <= 150)
ORDER BY distances
所有这些代码所做的是获取距离,然后按升序将它们显示在 microsoft sql 表中,并且它还有一个条件是只显示 150 英里内的距离,但我不知道如何在 sql 中舍入