tags:

views:

42

answers:

3

hi all.

i have used this query:

SELECT text    FROM all_source  WHERE owner = 'TOTAL' AND lower(name) = lower('LECGROUPTIME')   ORDER BY line

to find context function that named LECGROUPTIME. ive received:

Function LECGROUPTIME (inGroupCode in varchar2)
Return Varchar2
is
Cursor GetTime is
Select Day,BeginTime,Endtime
From Program Where Groupcode = inGroupCode;
MyDay Varchar2(10) ;
MyFlag Number;
MyTime Varchar2(200);
MyBuf Varchar2(50);
MyDayBuf Varchar2(10);
MyBeginTime Date;
MyEndTime Date;
begin
MyFlag := 0;
myTime := ' ';
Open GetTime;
Loop
Fetch GetTime InTo MyDay,mybeginTime,MyEndTime;
Exit When (GetTime%NOTFOUND) OR (GetTime%NOTFOUND is NULL);
Select Day InTo MyDayBuf From Refrence
Where No = MyDay;
If MyFlag <> 0 Then
MyTime := MyTime || ' و ';
End If;
MyTime := MyTime || myDayBuf || To_Char(MyBeginTime,'HH24:MI') || ' تا ' || To_Char(MyEndTime,'HH24:MI');
MyFlag := 1;
End Loop;
Close GetTime;
IF myTime=' ' Then
MyTime:='--';
End If;
Return MyTime;
Exception
When NO_DATA_FOUND Then
Return '--';
End;

in one line there is: Select Day,BeginTime,Endtime From Program Where ...

i cant see any table that named Program... can you say me why? thanks...

+1  A: 

Can you run that query yourself?

What about ...

select *
from   all_objects
where  object_name = 'PROGRAM';
David Aldridge
i can run it but executation retrives nothing...
backdoor
A: 

Your user on your DB most likely does not have rights to see that table. You can confirm this with your DBA.

akf
A: 

You can not see it because you do not have permission to see it. The function can however "see it" when you run it because, by default, it has the rights of the definer.

Here is more info: http://download.oracle.com/docs/cd/B13789%5F01/appdev.101/b10807/08%5Fsubs.htm#i18574

David