Problem
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 23
Cause
a varchar2(2000);
Action
FIXED by changing how I declared the variable “a” to:
a varchar2(9000);
Note
Change the declared variable according to your requirements.