Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

A question about SDO_NN_DISTANCE!

41961Oct 6 2002
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

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Nov 5 2002
Added on Oct 6 2002
1 comment
237 views