Is there an equivalent to the PostGIS ST_MULTI available in Oracle Spatial?
or
How can I convert POLYGON to MULTIPOLYGON in Oracle spatial?
Is there an equivalent to the PostGIS ST_MULTI available in Oracle Spatial?
or
How can I convert POLYGON to MULTIPOLYGON in Oracle spatial?
You mean you have a table that contains a mix of polygons (SDO_GTYPE 2003) and multi-polygons (SDO_GTYPE 2007) and your application cannot handle that mix, i.e. it requires the input to be all SDO_GTYPE 2007 ?
Like Vince said, you need to fix your application. I see no reason for such a requirement.
Otherwise, you can actually force the SDO_TYPE of the existing data by making them all appear to be multi-polygons, by doing this:
update my_table t
set t.my_geometry.sdo_gtype=2007
where t.my_geometry.sdo_gtype=2003;
If the table is large and contains many 2003 geometries, then you may want to first drop the spatial index before doing the update (and re-create it afterwards).
Now your table will contain true multi-polygons (that contain multiple polygons) and others that look like multi-polygons but that actually contain just one polygon. After all you can argue that a multi-polygon with one polygon is just a special case of a multi-polygon :-).
Hopefully that will make your application happy. As for the database and Oracle Spatial, they will be happy too.
Your best solution is to fix the application, unless corrupting the single-part geometries by adding tiny holes with tinier islands or adding an out-of-bounds part to all geometries holds allure.