ERROR

st_numgeometries in Oracle encounters the error ORA-29900: operator binding does not exist

Last Published: April 25, 2020

Error Message

Attempting to pass an ST_Geometry attribute that is not an st_geometrycollection (multi-part feature) encounters the following Oracle error:

"SELECT sde.st_numgeometries(shape) FROM zipcodes
*
ERROR at line 1:
ORA-29900: operator binding does not exist
ORA-06553: PLS-306: wrong number or types of arguments in call to
'ST_NUMGEOMETRIES'"

Cause

The error is encountered when an ST_Geometry attribute of st_point, st_linestring or st_polygon is passed to the sde.st_numgeometries operator. The st_numgeometries operator argument requires the input geometry to be a collection, which is an sde.st_geometrycollection type defined as either st_multipoint, st_multilinestring or st_multipolygon.

The following example demonstrates using st_numgeometries with a table named zipcodes which contains both st_polgyon and st_multipolygon geometries. In the example, where the multi-part polygon is passed to the operator, no error is encountered and the number of parts for the input geometry is returned. When passing a polygon to the operator, the error is encountered.

Code:
SQL> CREATE TABLE zipcodes
2 (postal_code NUMBER,
3 shape sde.st_geometry);

Table created.

SQL> INSERT INTO zipcodes VALUES
2 (45208, st_geometry('multipolygon (((10 10, 10 50, 50 50, 50 10, 10 10),
3 (60 60, 60 70, 70 70, 70 60, 60 60)))', 1));

1 row created.

SQL> SELECT sde.st_numgeometries(shape)
2 FROM zipcodes
3 WHERE postal_code = 45208;

SDE.ST_NUMGEOMETRIES(SHAPE)
---------------------------
2

SQL> INSERT INTO zipcodes VALUES
2 (92373, st_geometry('polygon ((1 1, 1 5, 5 5, 5 1, 1 1))', 1));

1 row created.

SQL> SELECT sde.st_numgeometries(shape)
2 FROM zipcodes
3 WHERE postal_code = 92373;

SELECT sde.st_numgeometries(shape) FROM zipcodes WHERE postal_code = 92373
*
ERROR at line 1:
ORA-29900: operator binding does not exist
ORA-06553: PLS-306: wrong number or types of arguments in call to
'ST_NUMGEOMETRIES'


Solution or Workaround

Do not attempt to pass an ST_Geometry attribute to the operator that is not of type st_multipoint, st_multilinestring or st_multipolygon.

    Article ID:000009806

    Software:
    • Legacy Products

    Get help from ArcGIS experts

    Contact technical support

    Download the Esri Support App

    Go to download options

    Discover more on this topic