Home » Server Options » Spatial » SDO_RELATE (SQL DEVELOPER 2.1)
SDO_RELATE [message #561712] Tue, 24 July 2012 23:00 Go to next message
orasql2010
Messages: 3
Registered: April 2012
Junior Member
Hi,

I am new to Oracle Spatial,
Trying to pull out some data from 2 tables using SDO_RELATE...Any suggestions

SELECT P.PROPNUM AS PROP_NUM,
PI.PROP_CODE AS PROP_CODE,
FROM AB.PROPERTY_POLY P,
INNER JOIN AB.PLANS PI ON SDO_RELATE(PI.GEOMETRY, P.GEOMETRY,'mask=contains+inside+covers+overlapbdyintersect+equal+on+coveredby')='true';

Errors:
ORA-00604: error occurred at recursive SQL level 1
ORA-13207: incorrect use of the [SDO_RELATE] operator
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 500
ORA-06512: at line 4
00604. 00000 - "error occurred at recursive SQL level %s"
*Cause: An error occurred while processing a recursive SQL statement
(a statement applying to internal dictionary tables).
*Action: If the situation described in the next error on the stack
can be corrected, do so; otherwise contact Oracle Support.
Error at Line: 6 Column:
Re: SDO_RELATE [message #561716 is a reply to message #561712] Wed, 25 July 2012 00:04 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Oracle
ORA-13207: incorrect use of the [string] operator

Cause: An error was encountered while evaluating the specified operator.

Action: Check the parameters and the return type of the specified operator.
Re: SDO_RELATE [message #561740 is a reply to message #561716] Wed, 25 July 2012 01:48 Go to previous messageGo to next message
_jum
Messages: 577
Registered: February 2008
Senior Member
It seems, that You can't use sdo_relate as JOIN condition.
With the table from ORACLE documentation you could use the spatial operator sdo_relate:
SELECT m1.mkt_id m1,
       m2.mkt_id m2, 
       sdo_relate(m1.shape, m2.shape, 'mask=contains+inside+covers+overlapbdyintersect+equal+on+coveredby') rela
  FROM cola_markets m1 
 INNER JOIN cola_markets m2 
    ON (m1.mkt_id<>m2.mkt_id)
 WHERE sdo_relate(m1.shape, m2.shape, 'mask=contains+inside+covers+overlapbdyintersect+equal+on+coveredby+touch')='TRUE';

m1      m2      rela
--------------------------- 
2	1	FALSE
3	1	TRUE
1	2	FALSE
3	2	TRUE
2	3	TRUE
1	3	TRUE
Re: SDO_RELATE [message #562002 is a reply to message #561740] Thu, 26 July 2012 17:48 Go to previous message
orasql2010
Messages: 3
Registered: April 2012
Junior Member
Thanks so much.....worked fine.....
Previous Topic: merge geometry lines
Next Topic: declare geom SDO_GEOMETRY causing oracle mem usage increase
Goto Forum:
  


Current Time: Sat Dec 21 20:35:30 CST 2024