Skip to Main Content

Database Software

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.

character to number conversion error with SDO_CS.CONVERT_NTV2_TO_XML

_jumJun 2 2023 — edited Jun 2 2023

Tried SDO_CS.CONVERT_NTV2_TO_XML[ORACLE 19.18.0.0.0] as described in:

https://docs.oracle.com/en/database/oracle/oracle-database/19/spatl/SDO_CS-reference.html#GUID-36EC5150-C6F3-46B4-B1CF-76155F337A6B

Want to convert the the numerous times succesful used BETA2007.gsa [Germany] with the “manual standard” sql:

set lines 32000
set long 2000000000

DECLARE
 ntv2      CLOB;
 xml       XMLTYPE;
 ntv2_file BFILE;
BEGIN
 ntv2_file := BFILENAME('MY_WORK_DIR', 'BETA2007.gsa');
 DBMS_LOB.OPEN(ntv2_file, DBMS_LOB.LOB_READONLY);

 DBMS_LOB.CREATETEMPORARY(ntv2, TRUE, DBMS_LOB.SESSION);
 DBMS_LOB.OPEN(ntv2, DBMS_LOB.LOB_READWRITE);
 DBMS_LOB.LOADFROMFILE(ntv2, ntv2_file, DBMS_LOB.LOBMAXSIZE);
 DBMS_LOB.CLOSE(ntv2);
 DBMS_LOB.CLOSE(ntv2_file);

 SDO_CS.convert_NTv2_to_XML(ntv2, xml);
-- SDO_CS.convert_XML_to_NTv2(xml, ntv2);
 DBMS_OUTPUT.PUT_LINE(SUBSTR(ntv2, 1, 32000));
END;

Always get:

ORA-06502: PL/SQL: numeric or value error: character to number conversion error
ORA-06512: at "MDSYS.SDO_CS", line 3716
ORA-06512: at "MDSYS.SDO_CS", line 3830

Found similar but not answered questions from 2014 here in the forum.

This post has been answered by _jum on Jun 2 2023
Jump to Answer

Comments

Processing

Post Details

Added on Jun 2 2023
1 comment
153 views