Is there a way to create one polygon from a feature that has many polygons using oracle spatial functions? attached is a picture of many polygons that I would like to have converted to one polygon with just the outline

I have used SDO_CONCAVEHULL( SDO_AGGR_UNION(SDOAGGRTYPE(geom,0.005)),0.005)) but i get the following polygon with the bad corners:

Any help would be much appropriated.
Regards,
Alex;