Problem using DBMS_LOB.WriteAppend
From: Jason <jasonw_at_lilly.com>
Date: 22 Oct 2002 13:25:30 -0700
Message-ID: <2361188b.0210221225.364b4dea_at_posting.google.com>
Date: 22 Oct 2002 13:25:30 -0700
Message-ID: <2361188b.0210221225.364b4dea_at_posting.google.com>
I don't understand what is wrong with the code I am using.. When I try call the proc it returns 'ORA-06502: PL/SQL: numeric or value error ORA-06512'. What am I doing wrong? The column CONTENT is set to CLOB. I am trying to append data to the CLOB. Am I approaching this the wrong way? I would appreicate any help. I've been working on this forever.
CREATE OR REPLACE PROCEDURE CreateDoc (mychunk IN VARCHAR2, id in
VARCHAR2) AS
Result CLOB := EMPTY_CLOB;
Old_Buff CLOB;
BEGIN
DBMS_LOB.CreateTemporary(Result, TRUE);
SELECT CONTENT
INTO Result
FROM KB_DOCS
WHERE DOC_ID = id
FOR UPDATE;
DBMS_LOB.WriteAppend(Result, LENGTH(mychunk), mychunk);
END;
/
Received on Tue Oct 22 2002 - 22:25:30 CEST