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.
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.
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.
does it runs in sql plus?
select last_friday(to_date('02/05
Kill your all sessions in DBA module of TOAD and try it again.
regards.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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;