当我尝试执行下面的 sql 时,我收到一条错误消息,指出 Invalid Column Name distance。我没有在我的 sql 中发布那么多,所以我不确定问题是什么。在此先感谢您的帮助!
SELECT ID,
3959 * ACOS(COS(RADIANS(34.743305))
* COS(RADIANS(Lattitude)) * COS(RADIANS(Longitude) - RADIANS(- 85.059586))
+ SIN(RADIANS(34.743305)) * SIN(RADIANS(Lattitude))) AS distance
FROM RetailerRegistration
HAVING (distance < 25)