I am attempting to create a query layer in ArcMap 10 to an Oracle database, using the centroid as the geometry for the data. I can't post the actual query, but here is a generalization:SELECT TO_CHAR(F.ID) "Unique ID", SDO_Geom.SDO_Centroid(S.Geometry,1) "Centroid"
FROM MyTable F, AnotherTable S
WHERE F.ID = S.MyTable_ID
Arc is able to validate the query and determime that the geometry type is a Point with unknown spatial reference. I then set the reference to WGS84 (leaving as Unknown doesn't help) and save the query layer. As soon as it attempts to refresh the data, i get the following error:One or more layers failed to draw:
MyQuery: Underlying DBMS error [ORA-06553:
PLS-306: wrong number or types of arguments in call to
'OGC_CENTROID'
]
I've run the SQL in SQLDeveloper and the data returns perfectly, so the syntax is correct. Why does Arc call 'OGC_CENTROID', and is this the reason for the query failing? Is there a different Oracle-compatible centroid function that Arc supports?