PLS-00215: String length constraints must be in range

PLS-00215: String length constraints must be in range (1 .. 32767)

PLS-00215: String length constraints must be in range (1 .. 32767)

Cause:

When a character variable was declared, a length outside the legal range was specified.

Solution:

Change the length constraint, making sure that it lies in the range 1 .. 32767.

Example:

declare
	v_string varchar2(40000);
begin
	select name 
	into v_string 
	from employees 
	where id = 1;
end;

Output:

ORA-06550: line 2, column 20:
PLS-00215: String length constraints must be in range (1 .. 32767)

Correct

declare
  v_string varchar2(32767);
begin
	select name 
	into v_string 
	from employees 
	where id = 1;
end;

Output:

anonymous block completed