Home » SQL & PL/SQL » SQL & PL/SQL » View functions and procedures
View functions and procedures [message #4206] Mon, 18 November 2002 10:21 Go to next message
shafik
Messages: 13
Registered: March 2002
Junior Member
Does anyone know the view required to view function and procedure body ?

Thanks in dvance.

Shafik.
Re: View functions and procedures [message #4207 is a reply to message #4206] Mon, 18 November 2002 11:07 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
SQL> ed
Wrote file afiedt.buf

  1* select line,text from user_source where name='FOO'
SQL> /

      LINE TEXT
---------- --------------------------------------------------------------------------------
         1 function fOO(n number) return varchar2 is
         2 retval varchar2(200);
         3 cursor c1 is select  distinct ENAME from EMP where DEPTNO=n;
         4 begin
         5 for crec in c1 loop
         6 if c1%rowcount=1 then
         7 retval:= crec.ENAME;
         8 else
         9 retval:=retval||','||crec.ENAME;
        10 end if;
        11 end loop;
        12 return retval;
        13 end;

13 rows selected.

Previous Topic: ORA-00979: not a GROUP BY expression
Next Topic: AVG Function
Goto Forum:
  


Current Time: Mon Apr 29 05:53:49 CDT 2024