Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Viewing code in stored procedures and functions

Re: Viewing code in stored procedures and functions

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 27 Feb 2003 16:41:33 -0800
Message-ID: <92eeeff0.0302271641.3bfe8651@posting.google.com>


"Chris \( Val \)" <chrisval_at_bigpond.com.au> wrote in message news:<b3ku4k$1lqb4h$1_at_ID-110726.news.dfncis.de>...
> "Guido Konsolke" <Guido.Konsolke_at_triaton.com> wrote in message
> news:1046343717.620180_at_news.thyssen.com...
> | "Chris ( Val )" <chrisval_at_bigpond.com.au> schrieb im Newsbeitrag
> | news:b3kqkh$1nv0qe$1_at_ID-110726.news.dfncis.de...
> | > Hi everyone.
> | >
> | > I have some stored procedures, and I haven't been able to
> | > find out how to view the code for them properly. What I
> | > mean by that is, when I use the following command in SQL*PLUS:
> | >
> | > SELECT TEXT FROM USER_SOURCE MyProcedure;
> | >
> | > ... I get a listing of the code for *all* my procedures.
> | >
> | > Is there a way that I can just view the code for *MyProcedure*,
> | > only, without viewing screens full from all the others ?.
> | >
> | > Any and all advice welcome.
> | >
> | > Thanks.
> | > Chris Val
> |
> | Hi Chris,
> |
> | ever heard about the WHERE clause ;-) ?
> | Try this:
> | SELECT text FROM user_source
> | WHERE name = 'MYPROCEDURE' -- names are upper case by default
> | ORDER BY line;
> |
> | Does it look better?
>
>
> Hi Guido.
>
> You're a legend :-).
>
> I have just started learning this stuff(a request from my boss).
> I actually did try a where clause, but without the single quotes,
> and in lowercase :-).
>
> Thank you very much. I will be back with more questions in
> the future, I'm sure :-).
>

You may also want to look into downloading TOAD (I believe freeware) from http://www.quest.com/solutions/download.asp. It will give you a nice graphical look at your code rather then garbled text from Sqlplus.

Regards
/Rauf Sarwar Received on Thu Feb 27 2003 - 18:41:33 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US