Hi,
I found a problem when trying to output a variable of VARCHAR2(4000).
Example:
CREATE TABLE teste as
select lpad('A',4000,'A') text from dual;
-- I changed the buffer size in PL/SQL Developer to 10000000
When I run this code:
DECLARE
l_text VARCHAR2(4000);
BEGIN
dbms_output.enable(NULL);
SELECT text
INTO l_text
FROM teste;
dbms_output.put_line(l_text);
END;
I always get the error: ORA-06502: PL/SQL: numeric or value error: character string buffer too small.
After some testing, I found out that the sweetspot is at 1333 A. If I use 1334 I get the error.
If I run the same code in TOAD, it outputs the correct result without errors.
Could you please fix this problem.
Thanks in advance,
Manuel Vidigal