select t.propert1,
t.propert2,
t.propert3,
t.propert4,
SDO_GEOM.SDO_DISTANCE(T.ora_geometry,
MDSYS.SDO_GEOMETRY(3001,
null,
MDSYS.SDO_POINT_TYPE(419204.591325841,
142405.186982172,
0),
NULL,
NULL),
0.5) AS DIS
from TABLE1@datalink T
where sdo_within_distance(T.Ora_Geometry,
MDSYS.SDO_GEOMETRY(3001,
null,
MDSYS.SDO_POINT_TYPE(419204.591325841,
142405.186982172,
0),
NULL,
NULL),
'DISTANCE=5') = 'TRUE' and t.tablename='NODE'
order by DIS
弹出错误:oracle database linkracle spatial
检查一下空间索引看看
ORA-13226: interface not supported without a spatial index
Cause: The geometry table does not have a spatial index.
Action: Verify that the geometry table referenced in the spatial operator has a spatial index on it.