Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Function Call in PL/SQL script
There is an example:
declare
v_msg varchar2(100);
/*function declaration, should be in the last in declaration section*/
function aaa return date is
v_aaa date;
begin
select sysdate into v_aaa from dual;
return v_aaa;
end aaa;
begin
/*the above-defined function aaa is used inside to_char*/
v_msg := 'The date is: '||to_char(aaa,'MM/DD/RR');
dbms_output.put_line(v_msg);
end;
/
In article <7j5blu$rkq$1_at_news.accu.uu.nl>,
"A. el Azzouzi" <A.elAzzouzi_at_cta.usc.uu.nl> wrote:
> Hello there,
>
> Does anyone know if there is a possibility to define
> a function in a PL/SQL-script in order to call it many times
> in the same script.
> So, I don't mean stored procedures/packages.
>
> Many thanks in advance,
>
> A.
>
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Thu Jun 03 1999 - 08:25:48 CDT