Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Internal Function Call within a SELECT statement
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 || '.' );
Thank you in advance for your cooperation.
Kevin Received on Fri Jul 31 1998 - 13:56:44 CDT