Link to home
Start Free TrialLog in
Avatar of VickieRaj
VickieRaj

asked on

Error while executing a function in Debug mode using TOAD

HI,

I have written a simple Oracle function. I want to execute this oracle function in debug mode in TOAD. I set the input value to the function using the set parameter dialog box. Now when i execute this function in debug mode i get the following error in a  message box

Probe: Timeout Error.

When i click ok , the Toad application hangs.

Something about the function.
Input value: Date
Return value : Date
It is a function that accepts input parameter any date and returns the friday of the earlier week of the input date.

Please help ASAP

email me at :  vickieraj@yahoo.com

Rgds
Raj.
Avatar of dbms_chu
dbms_chu

I was not able to recreate your error.

Here is the code that I tested through Toad  7.4.0.3 and Oracle 9i

CREATE OR REPLACE FUNCTION f_lastfriday(i_dt in date) RETURN date IS
tmpVar date;
BEGIN
   
   for i in 1 .. 7
   loop
          
   if trim(to_char(i_dt - i,'DAY'))='FRIDAY'
   then tmpVar := i_dt - i;
   end if;
   
   end loop;
   
   RETURN tmpVar;
   EXCEPTION
     WHEN OTHERS THEN
       -- Consider logging the error and then re-raise
       RAISE;
END f_lastfriday;
Hi,

does it runs in sql plus?

select last_friday(to_date('02/05/2004','DD/MM/YYYY')) from dual;


Kill your all sessions in DBA module of TOAD and try it again.

regards.
ASKER CERTIFIED SOLUTION
Avatar of catchmeifuwant
catchmeifuwant

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial