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.

HELP!! SDO_RELATE inside Oracle procedure - ORA-13207: incorrect use of the

462721Oct 26 2005 — edited Oct 27 2005
Hello,

I need help !
I have a problem with queries inside procedures/packages.

When execute sql

SQL> SELECT LOC_OBJ_ID
2 FROM VORO_LOC X, LBS_OZ_AREAS OZ
3 WHERE MDSYS.SDO_RELATE(X.SHAPE, OZ.GEOLOC, 'MASK=ANYINTERACT') = 'TRUE'
4 AND OZ.OZ_NAME='PTK' AND OZ.OZ_GROUP='GORCZEWSKA';

LOC_OBJ_ID
----------
2211379

i have results - it's OK
The next sql is same, but with agregation

SQL> SELECT COUNT(*) ILOSC
2 FROM VORO_LOC X, LBS_OZ_AREAS OZ
3 WHERE MDSYS.SDO_RELATE(X.SHAPE, OZ.GEOLOC, 'MASK=ANYINTERACT') = 'TRUE'
4 AND OZ.OZ_NAME='PTK' AND OZ.OZ_GROUP='GORCZEWSKA';

ILOSC
----------
1

it's OK
But when i want use this SQL inside proedurees in store result in variable i have problem

SQL> declare
2 V_NUMBER_NEI_LOC number;
3 begin
4 SELECT COUNT(*) ILOSC
5 INTO V_NUMBER_NEI_LOC
6 FROM VORO_LOC X, LBS_OZ_AREAS OZ
7 WHERE MDSYS.SDO_RELATE(X.SHAPE, OZ.GEOLOC, 'MASK=ANYINTERACT') = 'TRUE'
8 AND OZ.OZ_NAME='PTK' AND OZ.OZ_GROUP='GORCZEWSKA';
9 end;
10 /
declare
*
ORA-13207: incorrect use of the [SDO_RELATE] operator
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_9I", line 259
ORA-06512: at line 4
ORA-06512: at line 4


Please help!

Comments

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

Post Details

Locked on Nov 24 2005
Added on Oct 26 2005
1 comment
332 views