How can I query for multi-part features in an SDE.ST_GEOMETRY FC using SQL? (in the Select By Attributes window or in a definition query)
BUG-000150273
StatusIn Review SynopsisST_Geometry functions applied to the Shape field in Select By Attributes return the error message, "Error 000358: Invalid expression" if the feature class is registered as traditional versioned.
Environment
Reproduced in: ArcGIS Pro 3.0 or ArcGIS Pro 2.9.3 or ArcMap 10.8.2 or ArcMap 10.7.1Geodatabase version 10.9.2 or 10.7.1Oracle 18c
Steps to Reproduce
Additional information
Workarounds
OBJECTID IN
(SELECT
OBJECTID
FROM
USER1.ACTIVE_TRANSPORTATION
where
sde.st_length(shape) > 400
)
Use this WHERE clause in a definition query or the Select By Attributes window:
sde.st_numgeometries(shape) > 1
There is a known bug in versioned Oracle SDE.ST_GEOMETRY FCs. The above WHERE clause will throw an error: ORA-00904 Invalid Identifier "SHAPE".
Workaround:
Use a subquery.
objectid in (select objectid from my_owner.my_fc where sde.st_numgeometries(shape) > 1)
That bug only happens for SDE.ST_GEOMETRY.
Whereas if the FC was SDO_GEOMETRY, then spatial functions would work fine — even if the FC was versioned.
sdo_util.getnumelem(shape) > 1
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.