特定の緯度と経度から他の緯度と経度までの距離を見つけるために、プロジェクト用の小さなクエリ(ORACLE)を作成しています。
以下は私が使用したサンプルデータです
CREATE table test(id int, title varchar(50), place varchar(20),
postcode varchar(20), latitude DOUBLE PRECISION, longitude DOUBLE
PRECISION);
INSERT INTO test VALUES(1,'sekhar91','kanigiri','91982',16.15074,
-22.74426);
INSERT INTO test VALUES(2,'sekhar91','kanigiri','91982',16.13725,
-22.85822);
INSERT INTO test VALUES(3,'sekhar91','kanigiri','91982',14.85633,
-24.72379);
INSERT INTO test VALUES(4,'sekhar91','kanigiri','91982',14.86949,
-24.70150);
INSERT INTO test VALUES(5,'sekhar91','kanigiri','91982',15.03118,
-24.32523);
INSERT INTO test VALUES(6,'sekhar91','kanigiri','91982',14.88924,
-24.29403);
INSERT INTO test VALUES(7,'sekhar91','kanigiri','91982',14.89500,
-24.50000);
INSERT INTO test VALUES(8,'sekhar91','kanigiri','91982',15.20031,
-23.16798);
INSERT INTO test VALUES(9,'sekhar91','kanigiri','91982',16.72662,
-22.92971);
INSERT INTO test VALUES(10,'sekhar91','kanigiri','91982',16.60005,
-22.90818);
INSERT INTO test VALUES(11,'sekhar91','kanigiri','91982',15.19196,
-23.64427);
INSERT INTO test VALUES(12,'sekhar91','kanigiri','91982',14.92331,
-23.52119);
INSERT INTO test VALUES(13,'sekhar91','kanigiri','91982',14.91637,
-23.60410);
INSERT INTO test VALUES(14,'sekhar91','kanigiri','91982',14.92279,
-23.51720);
INSERT INTO test VALUES(15,'sekhar91','kanigiri','91982',14.92331,
-23.52119);
INSERT INTO test VALUES(16,'sekhar91','kanigiri','91982',15.09882,
-23.67105);
そして、私が書いたSqlクエリは
SELECT id,
title,
((ACOS(SIN(16.15074 * 3.141592653 / 180) *
SIN(latitude * 3.141592653 / 180) + COS(16.15074 * 3.141592653 / 180
) * COS(latitude * 3.141592653 / 180)* COS((-22.74426 -
longitude)*3.141592653 /180))*180/3.141592653)*60*1.1515) as distance
FROM test
HAVING distance<=100
上記のクエリを実行している間、Oracleは言っています
ORA-06553: PLS-306: wrong number or types of arguments in call to 'OGC_DISTANCE'
その理由とどこが間違っているのですか?
どんな助けでも大歓迎です