A question about SDO_NN_DISTANCE!
dear all,
I need to do an internal Join operation with
SDO_NN_DISTANCE. I can order the values of the
SDO_NN_DISTANCE, but can I specify SDO_NN_DISTANCE
in the query?
E.g,
select /*+ INDEX(tableA IDX_tableA) ORDERED */
mdsys.SDO_NN_DISTANCE(1) dist
from tableA a, tableA b
where (a.link_id = 111) and (b.linkid < 2232) and
sdo_nn ( b.geom, a.geom, 'sdo_num_res = 10 ', 1)='TRUE'
and mdsys.SDO_NN_DISTANCE(1) < 0.000001
order by dist;
But there is an error:
ERROR at line 1:
ORA-29902: error in executing ODCIIndexStart() routine
ORA-13207: incorrect use of the [SDO_NN_DISTANCE] operator
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_9I", line 368
ORA-06512: at line 1
If I remove the query "mdsys.SDO_NN_DISTANCE(1) < 0.000001",
then it works.
Thanks very much,
Fan