Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

infinite loop stored procedure

danielkMar 8 2011 — edited Mar 13 2011
I'm trying to create an infinite loop to test an error situation. I'm doing this in stored procedure. I've not created a stored procedure before. I keep getting errors when I write the script. Can you please tell me what I'm doing wrong with this script?


CREATE OR REPLACE PROCEDURE blah.test_timeout

IS

deadline_days number :=1;
grace_period number :=0;

BEGIN
-- get the deadline days

WHILE deadline_days < 4000
LOOP
grace_period := grace_period+1;
dbms_output.put_line ('hi mom');
END LOOP;


RAISE_APPLICATION_ERROR(-20071,'what_error Error:' || sqlerrm(sqlcode));

END;
/




thanks!
This post has been answered by 846916 on Mar 13 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 10 2011
Added on Mar 8 2011
3 comments
467 views