2012-10-29 66 views
1

我運行中的Oracle 11g以下querys:混亂的Oracle 11g空間數據庫SDO_RELATE anyintersect

1)select a1.apid from access_point a1 where sdo_relate(a1.shape,a1.shape,'mask=equal') = 'TRUE' and a1.apid = 'a5vhe';

2)select a1.apid from access_point a1 where sdo_relate(a1.shape,a1.shape,'mask=anyintersect') = 'TRUE' and a1.apid = 'a5vhe';

現在的Oracle 11g文檔定義掩模 'anyintersect' 爲「 ANYINTERACT:如果對象不相交,則返回TRUE。「那麼爲什麼oracle爲我的查詢1返回記錄a1併爲QUERY2返回none?

回答

0

你有一個錯字。

  • 不正確的:sdo_relate(a1.shape,a1.shape,'mask=anyintersect')
  • 正確:sdo_relate(a1.shape,a1.shape,'mask=anyinteract')