oracle - ORA 06502 error when called inside procedure but when executed using test window it works well -
i'm invoking procedure schema1.proc1 procedure schmea2.proc2 using dblink. cases schema1.proc1 returns error
ora-06502: pl/sql: numeric or value error: character string buffer small
however, when try execute same input arguments using pl/sql, works properly.
please me in resolving error.
code:
var1 varchar2(10), var2 varchar2(25), var3 varchar2(75), var4 varchar2(200) begin pkg1.getdetails@dblink1(var1, var2, var3,var4); end create or replace package body pkg1 procedure getdetails (var1 in varchar2, var2 out varchar2, var3 out varchar2, var4 out varchar2) v_var2 varchar2(100); v_var3 varchar2(200); begin select col2,col3 v_var2, v_var3 table1 col1 = var1; var2 := substr(v_var2,1,25); var3 := substr(v_var3,1,75); exception when others var4 := substr(sqlerrm,1,200); end;
end;
this long comment.
there possibility error here:
select col2, col3 v_var2, v_var3 table1 col1 = var1;
perhaps col2
, col3
can longer 100/200 characters.
you might go for:
select substr(col2, 1, 25), substr(col3, 1, 75) var2, var3 table1 col1 = var1;
Comments
Post a Comment