我想要形成一個查詢,使用SDO_WITHIN_DISTANCE返回給定矩形內的實體列表。我所做的查詢看起來應該可行,但Oracle給我一些奇怪的錯誤。這裏的查詢:問題與Oracle(空間幾何)查詢
SELECT *
FROM TBLENTITYLOCATION TL
INNER JOIN TBLENTITY TE
ON TE.ENTITYID=TL.ENTITYID
WHERE SDO_WITHIN_DISTANCE (TL.GEOLOCATION
, SDO_GEOMETRY (2003
, NULL
, NULL
, SDO_ELEM_INFO_ARRAY(1, 1003, 3)
, SDO_ORDINATE_ARRAY(41, -73, 36, -82)
), 'DISTANCE=10 UNIT=M'
) = 'TRUE'
AND TL.LOCATIONDATETIME= (select MAX(LOCATIONDATETIME)
FROM TBLENTITYLOCATION
WHERE ENTITYID = TE.ENTITYID)
的錯誤如下:
ORA-29902: error in executing ODCIIndexStart() routine
ORA-13208: internal error while evaluating [window SRID does not match layer SRID] operator
ORA-06512: at MDSYS.SDO_INDEX_METHOD_10I", line 286
OERR說:
29902. 00000 - "error in executing ODCIIndexStart() routine"
*Cause: The execution of ODCIIndexStart routine caused an error.
*Action: Examine the error messages produced by the indextype code and take appropriate action.
感謝任何幫助或想法。
哪個版本的Oracle數據庫? – APC 2010-07-15 19:48:05