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: Chris \( Val \) <chrisval_at_bigpond.com.au>
Date: Sun, 2 Mar 2003 22:17:09 +1100
Message-ID: <b3sp7g$1q1t95$1@ID-110726.news.dfncis.de>

"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 :-).

Thanks for your previous help, I have a similar question though.

I purchased a book: O'REILLY: Oracle Programming, 3rd Edition. I have been searching through it for a way to do the same as the above, however, I would like to view the source code of a procedure or function within a package in SQL*PLUS.

Is this at all possible ?.

Also, is there a really good beginners book on PL/SQL that any of you guy's would recommend ?. I feel that this book I purchased assumes some prior knowledge.

Cheers.
Chris Val

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.454 / Virus Database: 253 - Release Date: 10/02/2003
Received on Sun Mar 02 2003 - 05:17:09 CST

Original text of this message

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