Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Maximum VARCHAR2 length in stored procedure parameter

InoLDec 21 2005 — edited Nov 18 2008
DB version EE 9.2.0.6 on Win2K.

I get error "character string buffer too small" when running procedure in a package. Simplified (there are actually more parameters in the procedure call):
procedure x(p_var   in out varchar2)
  v_local   varchar2(4000)
begin
  v_local := 'a very long string .....';
  p_var := v_local;    -- Line giving error
end;
It works OK if I limit the output to 1000 characters (1001 is already too long):
procedure x(p_var   in out varchar2)
  v_local   varchar2(4000)
begin
  v_local := 'a very long string .....';
  p_var := substr(v_local,1,1000);
end;
I never heard of a limit of 1000 characters for a varchar2 procedure parameter, though. Any ideas?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 16 2008
Added on Dec 21 2005
9 comments
50,651 views