tags:

views:

62

answers:

2

I have this query:

select total.lecgrouplecture(l.groupcode)  lecturename,
       total.lecgrouptime(l.groupcode) lecttime 
  from total.lecgroup l  
 where term = (select term 
                from total.CURENTTERM) 
   and rownum < 10 
order by lecturename

I want to know what total.lecgrouptime(l.groupcode) is, and get this information from where?

+1  A: 

total is the package name

lecgrouplecture is a function within that package

Look in user_source for the code or use a GUI like SQL Developer or TOAD

Robert Merkwürdigeliebe
thanks.i user this query to see inside user source:SELECT * FROM User_Source but i cant see anything about lecgrouplecture.
backdoor
select text from user_source where name = 'TOTAL' order by line; It could be that you are not the owner of the package: select text from all_source where name = 'TOTAL' order by line;
Robert Merkwürdigeliebe
A: 

Hi backdoor,

it looks like TOTAL is the name of a schema (SELECT * FROM all_users WHERE username = 'TOTAL'). If this is the case then lecgrouplecture must be a pl/sql function. You will find what it does with Robert's query:

SELECT * 
  FROM all_source 
 WHERE owner = 'TOTAL' 
   AND name = 'LECGROUPLECTURE' 
 ORDER BY line;
Vincent Malgrat
@Vincent: thanks =). I'm so used to writing packages I didn't even consider it could be a standalone function.
Robert Merkwürdigeliebe