stored function problem
From: River <wychan_at_vol.net>
Date: Mon, 03 May 1999 20:43:27 +0800
Message-ID: <372D99EF.A25311D2_at_vol.net>
[Quoted] Question about a very simple stored function:
end get_content;
Date: Mon, 03 May 1999 20:43:27 +0800
Message-ID: <372D99EF.A25311D2_at_vol.net>
[Quoted] Question about a very simple stored function:
create or replace get_content ( sys_code in char ) return char
is
rcontent char;
begin
select content into rcontent from secret where code = sys_code; return rcontent;
end get_content;
[Quoted] table: secret ( code varchar2(8), content varchar2(10) )
It fails when running " select get_content('ABC') from dual; ". It said ORA-6502 : "PL/SQL : numeric or value error" at line 5. The table secret have a record matches that sql statement.
However, when I change every things to NUMBER, including the table
columns,
the variables in the stored function, the function is work when running
" select get_content(123) from dual; ".
Why?!!
Thanks for any advice,
River
wychan_at_vol.net
Received on Mon May 03 1999 - 14:43:27 CEST