Skip to Main Content

APEX

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

how to fix this error ORA-13050: unable to construct spatial object ORA-06512:

mpumi madibaMar 28 2023

ora_sqlerrm: ORA-13050: unable to construct spatial object ORA-06512: at "APEX_220200.WWV_FLOW_PROCESS_NATIVE", line 55 ORA-06512: at "APEX_220200.WWV_FLOW_CODE_EXEC_PLSQL", line 126 ORA-06512: at "APEX_220200.WWV_FLOW_DYNAMIC_EXEC", line 2654 ORA-06512: at "MDSYS.SDO_UTIL", line 673 ORA-06512: at "MDSYS.SDO_UTIL", line 691 ORA-06512: at line 1 ORA-06512: at

procedure i am using create or replace PROCEDURE load_json_data(json_data CLOB) IS
v_id NUMBER;
v_label VARCHAR2(100);
v_color VARCHAR2(20);
v_polygon SDO_GEOMETRY;
BEGIN
-- Parse the JSON data
SELECT JSON_VALUE(json_data, '$.data.id') INTO v_id FROM DUAL;
SELECT JSON_VALUE(json_data, '$.data.label') INTO v_label FROM DUAL;
SELECT JSON_VALUE(json_data, '$.data.color') INTO v_color FROM DUAL;
SELECT SDO_UTIL.FROM_JSON(
JSON_VALUE(json_data, '$.data.allData[0][0].geometry')
) INTO v_polygon FROM DUAL;

-- Insert the data into the table
INSERT INTO json_data (id, label, color, polygon)
VALUES (v_id, v_label, v_color, v_polygon);
END;

Comments

Post Details

Added on Mar 28 2023
4 comments
104 views