Internal Function Call within a SELECT statement
From: Kevin Bass <akil1_at_mindspring.com>
Date: Fri, 31 Jul 1998 14:56:53 -0400
Message-ID: <6pt4b8$lh0$2_at_camel29.mindspring.com>
I am attempting to call an internal function from within a select statement. I can perform this task if the function is stored within the database but I cannot seem to perfom the same task with the internal function. How can I call my internal function within the select statement (below)? Does the function have to be within the databse to perform this task?
end;
/
show errors
Date: Fri, 31 Jul 1998 14:56:53 -0400
Message-ID: <6pt4b8$lh0$2_at_camel29.mindspring.com>
I am attempting to call an internal function from within a select statement. I can perform this task if the function is stored within the database but I cannot seem to perfom the same task with the internal function. How can I call my internal function within the select statement (below)? Does the function have to be within the databse to perform this task?
declare
my_govt_id varchar2(35);
function get_govt_id( v_person_id in varchar2 ) return varchar2
is
l_govt_id varchar2(35);
begin
select govt_id
into l_govt_id
from people
where people_id = v_person_id;
return( l_govt_id );
end;
begin
select get_govt_id( '&&1' )
into my_govt_id
from dual;
dbms_output.put_line( 'Govt_id for person ' || '&&1' || ' is ' ||
my_govt_id || '.' );
end;
/
show errors
Thank you in advance for your cooperation.
Kevin Received on Fri Jul 31 1998 - 20:56:53 CEST
