I have an Oracle Spatial table (in 12c) with a polygon geometry type. I added a text column to the table that I would like to populate with the well-known text of the polygon's centroid. In concept this is really simple but I'm having trouble using the SDO_CENTROID
function properly. This is my SQL statement so far:
update parcel
set centroid_wkt = sdo_util.to_wktgeometry(sdo_geom.sdo_centroid(shape, usgm.diminfo))
from user_sdo_geom_metadata usgm;
When I execute this it tells me SQL Error: ORA-00933: SQL command not properly ended
. Can anyone tell what I'm doing wrong here? My guess is that the UPDATE... SET... FROM...
syntax doesn't work in Oracle, but I'm not sure how else to select the diminfo
array.