Function may not be use in SQL - PLS-00231
573518Oct 31 2007 — edited Nov 1 2007Here is my code,
-- Database 10g Enterprise Edition Release 10.2.0.2.0
declare
v1 varchar2(2000);
function test_func ( v2 varchar2) return varchar2
is
begin
return v2 || 'x' || v2;
end;
begin
-- ok
v1 := test_func('Hello');
--- Error PLS-00231: Function may not be used
--insert into xxxx values test_func(….
select test_func('World') into v1 from dual;
end;
I don’t want to define test_func in database as a stand-alone/package function. Is there any other way in 10G.
Thanks.