reading CLOB issues
SQL> DECLARE
lobloc CLOB;
buffer VARCHAR2(32000);
amount NUMBER := 3000;
amount_in_buffer NUMBER;
offset NUMBER := 1;
BEGIN
--Initialize buffer with data to be inserted
SELECT html_file INTO lobloc -- get LOB handle
FROM test_clob
WHERE id = 1001;
dbms_lob.read(lobloc,amount,offset,buffer);
--using length built-in function to find the length of the buffer
2 3 4 5 6 7 8 9 amount_in_buffer := length(buffer);
dbms_output.put_line(buffer);
dbms_output.put_line(to_char(amount_in_buffer));