Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Spatial - ORA-13050: unable to construct spatial object

Jim JonesApr 23 2024 — edited Apr 23 2024

Hi,

I am having the ORA-13050: unable to construct spatial object error when running the following query:

Create table FAB.DOSSIER_E_GEOMETRIE_TMP NOLOGGING as
   select /*+ FIRST_ROWS(10) INDEX(d PK_DOSSIER) */
          d.*
        , 'TEK' "BRON"
        , (select sum( round(mdsys.sdo_geom.sdo_area(tek.geometrie, 0.005), 2) )
                   from VRO.TEKENING tek, vro.DOSSIERTEKENING dt
                   WHERE dt.TEKENING_ID = tek.id
                   and   dt.DOSSIER_ID = D.DOSSIER_ID
                   and   DT.DATUMAFVOER is null
                   and tek.DATUMAFVOER is null
                   --and tek.NIVEAU = 0
                   group by dossier_id) "OPPERVLAK_GEOM"
        , (select SDO_AGGR_UNION(MDSYS.SDOAGGRTYPE(GEOMETRIE, 0.001))
                   from VRO.TEKENING tek, vro.DOSSIERTEKENING dt
                   WHERE dt.TEKENING_ID = tek.id
                   and   dt.DOSSIER_ID = D.DOSSIER_ID
                   and DT.DATUMAFVOER is null
                   and tek.DATUMAFVOER is null
                   and tek.NIVEAU = 0
                   group by dossier_id) "GEOMETRIE"
     from vro.dossier d
    where D.STATUS <> 'H'
      and D.DOSSIERLETTER in ('E','EW')
      and d.DOSSIER_ID in (select DOSSIER_ID from vro.dossiertekening dt2, vro.tekening tek
                                      where dt2.DOSSIER_ID = d.DOSSIER_ID
                                        and dt2.DATUMAFVOER is null and dt2.TEKENING_ID = tek.ID and tek.DATUMAFVOER is null)  

The query was made by people who worked before me. There is no documentation. It should create a table and fill with data. It had been running fine but stopped working suddenly. What could be the issue?

Comments
Post Details
Added on Apr 23 2024
1 comment
265 views