我收到以下错误“发生了无效的浮点运算”。当我运行此查询时:
SELECT PolID, LocID, Address, City, StateCode, OrigGeoLat, OrigGeoLong, NewGeoLat, NewGeoLong,
acos(sin(radians(OrigGeoLat)) * sin(radians(NewGeoLat)) +
cos(radians(OrigGeoLat)) * cos(radians(NewGeoLat)) *
cos(radians(OrigGeoLong - NewGeoLong))) * 6372.8 as Distance
FROM zzGeoDataTMP
所有 *geoLat 和 *geoLong 数据都定义为 numeric(18,10)。当我运行查询时,我开始取回数据,然后在特定的数据行上出现错误。例如,以下行仅在调用 ACOS 函数时才引发上述异常:
OrigGeoLat|OrigGeoLong|NewGeoLat|NewGeoLong
---------------------------------------------
32.9364620|-80.0411000|32.9364620|-80.0411000
非常感谢您提供任何可以提供帮助的见解!