I currently need to get data which is a 'LONG RAW' data type and then re-insert the same data back as a new row in a table (I'm copying data).
I've created PL/SQL code but when pulling data which is a 'MS Word' document, I get ORA-06502 error: PL/SQL: numeric or value error.
Here is a snippet of my code:
t_doc_blob LONG RAW;
t_blob_pdf BLOB;
CURSOR c1_data
SELECT values, long raw, blob, etc...
FOR c1r IN c1_data LOOP
--INSERT of copied data to a table
--INSERT into document table which has the long raw and blob columns, but I don't insert the large files here.
-- get the large files from the SELECT
SELECT doc_blob, doc_blob_pdf, doc_original_extension
INTO t_doc_blob, t_blob_pdf, t_doc_original_extension
FROM documents
WHERE doc_seqnum = t_doc_seqnum
AND doc_num = t_doc__num;
EXCEPTION
WHEN OTHERS THEN
ROLLBACK;
t_error_code := SQLCODE;
t_error_message := SQLERRM; = ORA-06502 error: PL/SQL: numeric or value error
--UPDATE the document table with the large files, t_doc_blob, t_blob_pdf
END LOOP
Oracle 11 DB
Any help would be much appreciated.
Thank you,
William