我正在尝试形成一个查询,该查询使用SDO_WITHIN_DISTANCE返回给定矩形内的实体列表。我进行的查询似乎应该可以运行,但是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.
感谢您的帮助或想法。
ORA-13208错误是这里的主要错误。TL.GEOLOCATION需要SRID中的匹配值(SDO_GEOMETRY的第二个参数)
查看此处的回复是否对您有帮助。