Re: What is this SQL for, take a guess?
- From: rjamya <rjamya@xxxxxxxxx>
- To: post.ethan@xxxxxxxxx
- Date: Thu, 16 Mar 2006 07:24:18 -0500
it probably lists the procedure/function _names_ in your source code.
Raj
On 3/16/06, Ethan Post <post.ethan@xxxxxxxxx> wrote:
>
>
>
> I am pretty proud of this little bitty. Anyone want to take a swipe what it
> could be used for? Oh and it will up in 'ur quest spotlight right out.
>
>
>
> select name, next_line, t from (
>
> select name, line, lead(line, 1) over (order by name, line) next_line, t,
> lead(t, 1) over (order by name, line) t1 from (
>
> select name, type, line, decode(instr(t, ' '), 0, t, substr(t,1,instr(t,'
> '))) t from (
>
> select name, type, line,
> trim(decode(substr(t,1,8),'FUNCTION',substr(t,10), t)) t
> from (
> select name, type, line,
> decode(substr(t,1,9),'PROCEDURE',substr(t,11), t) t from (
> (select name, type, line,
> replace(upper(trim(translate(text,'('||chr(10)||chr(13)||chr(9),'
> '))), ' ', ' ') t
> from all_source where owner='SCOTT'
> and type not in ('PACKAGE','TRIGGER'))
> ) where (t not like '%CODE AND ALTERNATE PROCEDURE/REV CODE.%')
> and(t like 'PROCEDURE %' or t like 'BEGIN' or t like 'FUNCTION %')
> )))) where t <> 'BEGIN' and t1='BEGIN'
>
>
Raj
--
----------------------------------------------
Got RAC?
--
http://www.freelists.org/webpage/oracle-l
- References:
- What is this SQL for, take a guess?
- From: Ethan Post
Other related posts:
- » What is this SQL for, take a guess?
- » Re: What is this SQL for, take a guess?
- » Re: What is this SQL for, take a guess?
- What is this SQL for, take a guess?
- From: Ethan Post