我有这个查询
SELECT
id,
ssid,
bssid,
capabilities,
level,
frequency,
geolat,
geolong,
nickname,
(
" + rangeDouble + " * ACOS( (SIN( " + pi + " * " + geoLat + " / 180 ) * SIN( " + pi + " * lat / 180 ) ) + ( COS( " + pi + " * " + geoLat + " / 180 ) * COS( " + pi + " * lat / 180 ) * COS( ABS( ( " + pi + " * " + geoLng + " / 180 ) - ( " + pi + " * longg / 180 ) ) ) ) )
)
AS distanza
FROM
wifiTable
HAVING
distanza < " + rangeDouble + "
ORDER BY
distanza LIMIT 0,
20",
null
)
distanza就像英语中的距离。
如何将此查询从 SQL 转换为 SQLite?因为我不知道如何在java代码中使用SELECT得到的“lat”!